- fishをインストール
- oh-my-fishをインストール
- デフォルトシェルにしましょう
- themaをインストールします
- 番外編(rbenv)
まずは、brewでfishをインストールします。
1. fishをインストール
$ brew install fish
$ fish -v
fish, version 2.6.0
2. oh-my-fishをインストール
omfコマンドが利用できることを確認する
$ curl -L https://get.oh-my.fish | fish
・・・(省略)
Installation successful!
Welcome to fish, the friendly interactive shell
$ omf -v
Oh My Fish version 5
fishのコンフィグファイルは以下のパス
~/.config/fish/config.fish
3. デフォルトシェルにしましょう
$ which fish
$ chsh -s /usr/local/bin/fish
Changing shell for gulliver.
Password for gulliver:{#password}
もし、以下のようなメッセージが出た場合は
chsh: /usr/local/bin/fish: non-standard shell
注意: chshしてchsh: /usr/local/bin/fish: non-standard shell
と怒られる場合は
vimなどで/etc/shellsを開いてファイル末尾に/usr/local/bin/fishを追記するとよい
また、readonlyになっているのでsudo
を忘れずに
$ vi /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/usr/local/bin/fish
4. themaをインストールします
好きなテーマをここから探します
https://github.com/oh-my-fish/oh-my-fish/blob/master/docs/Themes.md#available-themes
お気に入りはこれ
$ omf install cyan
番外編(rbenv)
fishでrbenvを利用する場合は以下を実行するとよい
$ omf install rbenv