LoginSignup
0
0

Fishシェルをインストールした時にやること

Last updated at Posted at 2024-04-12

はじめに

途中までであるかもしれませんがFishをインストールしたときの初期設定を書いていきます

環境はWSL Ubuntu です

設定

vim

最初はfishでvimを開いたときにBS(バックスペース)のみで一文字戻ることができず不便でした
使えるようにするには
~/.config/fish/config.fishに

bind \b backward-delete-char

と追記
Ctrl + hでも左一文字を削除できるらしい

キーバインドはhttps://qiita.com/ryotako/items/ba7483b6fde025c91cef
またコマンドプロンプトの画面においてパス名が略されて表示されているのですべてを表示するなら
~/.config/fish/config.fishに

function fish_prompt
    echo -n (whoami)'@'(hostname)' '(pwd)' '
    echo -n '> '
end

と追記しましょう。

と書きました

プラグインマネージャー

oh-my-fishかfisherの場合は以下に示します
fisherの開発頻度はoh-my-fishより高そうでfisherでいいかなって感じ

oh-my-fishの場合

curl -L https://get.oh-my.fish | fish

または

wget -qO- https://get.oh-my.fish | fish

ちなみに
omf destroyでoh-my-fishのアンインストールができ

>read 

と入力が求められる

yes

と打てばアンインストールされる

yesと打てって書いてない...

こんな感じ

⋊> /m/c/U/{ユーザ名} omf destroy                                                                                                                     02:16:47
Checking for a sane environment...
This will uninstall Oh My Fish and all plugins and themes from 
/home/{ユーザ名}/.local/share/omf.
read> yes
Uninstalling from /home/{ユーザ名}/.local/share/omf...
Uninstall complete
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

fisherの場合

curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher

プラグインをインストール

fisher install <プラグイン名>

プラグインをアンインストール
uninstallではないので注意

fisher remove <プラグイン名>

その他

fish_config

と打つとGUIでfishの環境を変更できる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0