- fish本体インストール
brew install fish
- デフォルトシェルに指定する
sudo vi /etc/shells
chsh -s /usr/local/bin/fish
exec $SHELL -l
- プラグインマネージャ fisher をインストールする
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisher
- テーマをインストール
fisher add oh-my-fish/theme-bobthefish
- フォントの設定
git clone https://github.com/powerline/fonts.git
./install.sh
目的のフォントはpowerline/fonts内には格納されていなかったので直接インストールする.
git clone https://github.com/naver/d2codingfont.git
iterm2の Preference
>Profile
>Text
>Font
>Change Font
を D2Coding
に変更.
Use a different font for non-ASCII text
にチェックを入れたら Non-ASCII Font
も同様に設定する.
fisher ls
fisher add [name-of-plugin]
fisher add z
z [検索対象ディレクトリ]
z
は正常にインストールできないことがあるのでこちらも参照: Z
fisher add 0rax/fish-bd
z [ルートディレクトリ候補]
brew install peco
fisher add oh-my-fish/plugin-peco
Ctrl
+ R
にキーバインド設定.
function fish_user_key_bindings
bind \cr 'peco_select_history (commandline -b)'
end
ghqはgitのリポジトリ管理ツールで、fishと組み合わせることが多数のリポジトリ管理が楽になる.
brew install ghq
Ctrl
+ ]
にキーバインド設定.
function fish_user_key_bindings
bind \cr 'peco_select_history (commandline -b)'
bind \c] peco_select_ghq_repository #ここが追加分
end
ghqの詳しい使い方: ghqでリポジトリ管理とpeco連携で快適git生活
fisher add oh-my-fish/plugin-balias
エイリアスの設定.
function fish_user_key_bindings
bind \cr 'peco_select_history (commandline -b)'
bind \c] peco_select_ghq_repository
end
balias g git #ここが追加分、今回はgitをgコマンドに設定
fish_config
iTerm2のpaste設定.
Preference
>General
>Selection
>Application in terminal may access clipboard
にチェック.
同じく Pointer
>Bindings
の右クリ設定をコピペに変更.