$ brew install zsh
使用できるシェル一覧リスト(/etc/shells
)にHomebrewからインストールしたzshを追記する。
$ sudo sh -c "echo '/usr/local/bin/zsh' >> /etc/shells"
$ cat /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/zsh ←これ
追加できたら、そのzshに変更する
$ chsh -s /usr/local/bin/zsh
Changing shell for ruedap.
Password for ruedap: パスワードを入力する
これで新しいターミナルウィンドウを開けば、zshに切り替わっている。 念のため、元々入ってるzshではなく、Homebrewの最新の方が使われていることを確認しておく。
$ zsh --version
zsh 4.3.17 (x86_64-apple-darwin11.3.0)
$ /usr/local/bin/zsh --version
zsh 4.3.17 (x86_64-apple-darwin11.3.0)
$ /bin/zsh --version
zsh 4.3.11 (i386-apple-darwin11.0)
Thanks