ucan-lab / tips

5 stars 0 forks source link

Mac fish shell #38

Open ucan-lab opened 6 years ago

ucan-lab commented 6 years ago

fish shell

https://fishshell.com

標準搭載されている自動サジェスト機能が超強力。シェルライフが快適になる。

home brew から fish shell をインストール

$ brew install fish
$ fish -v
fish, version 2.7.1

デフォルトシェルをfishに変更

$ which fish
/usr/local/bin/fish

$ chsh -s /usr/local/bin/fish

chsh: /usr/local/bin/fish: non-standard shell エラーが出た場合

$ echo "/usr/local/bin/fish" | sudo tee -a /etc/shells
$ chsh -s /usr/local/bin/fish

デフォルトシェルをbashに戻したい場合

$ chsh -s /bin/bash

設定ファイルの場所

デメリット

bash スクリプトの実行

bash向けのスクリプトを実行する場合は、都度シェルを切り替える必要があり面倒。 それ以外は超快適。

ucan-lab commented 6 years ago

fishのプラグイン管理フレームワーク「fisherman」をインストール

$ curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisher
$ fisher -v
fisherman version 2.13.2 ~/.config/fish/functions/fisher.fish

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

おすすめプラグイン

pure

https://github.com/rafaelrinaldi/pure

$ fisher rafaelrinaldi/pure

z

https://github.com/fisherman/z

$ fisher z