WindowsからMacに移行中につき地道に環境構築中。
今回はzsh。ついでにPreztoを入れて、powerlineの設定まで確認してみます。
Zshのインストール
$ brew install zsh
zshの設定
/etc/shells
の編集
# 末尾に追加 /usr/local/bin/zsh
~/.zshrc
の作成
$ touch ~/.zshrc
デフォルトのシェルを変更
$ chsh -s /usr/local/bin/zsh
Preztoのインストール
$ git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" $ setopt EXTENDED_GLOB for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" done
.zshrcの設定
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi
設定確認
zshを新たに起動し初期設定が完了してデフォルトで sorin のテーマが設定されていることを確認する。
Themeを確認
powerline対応のRicty利用準備
powerlineに対応している Ricty をインストール
$ brew tap sanemat/font $ brew reinstall --powerline --vim-powerline ricty $ cp -f /usr/local/Cellar/ricty/3.2.4/share/fonts/Ricty*.ttf ~/Library/Fonts/ $ fc-cache -vf # Rictyを指定
インストール後、iTerm2のフォントにRicty for Powerlineを設定します。
設定を確認