Zsh + Prezto + powerlevel9k (macOS)
こんなプロンプトが欲しかったので。ただそれだけ。
Zsh
デフォルトのシェルを Zsh に変更する。
chsh -s /bin/zsh
Prezto
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
Powerline font
Powerline 用のフォントとして、Ricty with Powerline をインストールする。
brew tap sanemat/font brew install ricty --with-powerline cp -f /usr/local/opt/ricty/share/fonts/Ricty*.ttf ~/Library/Fonts/ fc-cache -vf
ターミナル(iTerm2等)のフォントに "Ricty Regular for Powerline" を指定する。
Powerlevel9k
Zsh 用のテーマである Powerlevel9k をインストールする。
brew tap sambadevi/powerlevel9k
brew install powerlevel9k
~/.zpreztorc でテーマを指定する。
zstyle ':prezto:module:prompt' theme 'powerlevel9k'
~/.zshrc に設定
POWERLEVEL9K_PROMPT_ON_NEWLINE=true POWERLEVEL9K_PROMPT_ADD_NEWLINE=true