久々にzshの設定を見直したのでメモ。
(windows10にwsl2まで入れた状態からスタート)
・brewのインストール
https://qiita.com/mtsgi/items/8a844870f30b30ef21e4#windows-terminal
curl file git入れていたので、build-essentialあとrubyがbrew実行前に必要。
・zshインストールからログインシェルの変更までを行う。
https://qiita.com/mtsgi/items/8a844870f30b30ef21e4#zsh-on-ubuntu-on-wsl2-on-windows-10
・zinit導入
https://qiita.com/szk07/items/b15c38ec73e547a23439#zinit-の導入
zsh-syntax-highlighting, zsh-completionsあたりを入れた。
・Powerlevel10k導入前のフォント整備
https://qiita.com/mtsgi/items/8a844870f30b30ef21e4#powerline-on-zsh-on-ubuntu-on-wsl2-on-windows-10
https://github.com/romkatv/powerlevel10k#fonts
Powerlevel10k導入前に対応フォントのインストールを行う。
自分はおすすめのまま、Meslo Nerd Font patched for Powerlevel10kを入れたが...
・他のフォントを調べたいなら
https://github.com/powerline/fonts
・windows terminalのフォント設定。
"profiles":->"list"のubuntuと同じグループ内に"fontFace" : "MesloLGS NF",を追記
・おまけ:デフォルト起動をubuntuにしたい場合は
"defaultProfile":→ubuntuのguid値を貼り付ける
・Powerlevel10k の導入
https://qiita.com/szk07/items/b15c38ec73e547a23439#powerlevel10k-の導入
やりたかったことのメイン
brewでインストールした後、
https://github.com/romkatv/powerlevel10k#zinit
のとおり、zinit ice depth=1; zinit light romkatv/powerlevel10k
を.zshrcに追記。
最後に.zshrcの見直しを行った。昔の設定だとデフォルト設定なのにsetoptしてるの結構あったので(いい加減)、マニュアルもとに見直したのであった。見直した版をgithubに上げておいた。
https://github.com/lyo/conf/blob/master/.zshrc.wsl2