Starship
https://raw.githubusercontent.com/starship/starship/master/media/icon.png
https://starship.rs/
/icons/github.icon https://github.com/starship/starship
https://raw.githubusercontent.com/starship/starship/master/media/demo.gif
プロンプトの情報を拡張して、複雑なシェル設定の拡張を行わずとも以下のような情報を付加してくれる。
Git で作業中のブランチ名を表示
インストールしている Rust や Go や Node.js や Ruby のバージョンを表示
Kubernetes で選択中のクラスタ名などを表示
Rust製。処理が高速でリッチでありながらプロンプトが重くならないのが良い。
インストール
macOS/Linux
$ brew install starship
設定方法
Bash
bash の場合は .bash_profile に以下の指定を入れる
code:.bash_profile
eval "$(starship init bash)"
Zsh
zsh の場合は .zshrc に以下の指定を入れる
code:.zshrc
eval "$(starship init zsh)"
Fish
Fish の場合は ~/.config/fish/config.fish に以下の指定を入れる
code:config.fish
starship init fish | source
使っている設定
設定は ~/.config/starship.toml で行う。
デフォルトでは可能な限り表示しようとするので、明らかに不要な表示は無効化すると良い。
物によって、無効化するだけではなく表示方法の細かな設定を行える。
code:starship.toml
cmd_duration
disabled = true
aws
disabled = true
php
disabled = true
perl
disabled = true
package
disabled = true
gcloud
disabled = true
git_branch
format = "on $symbol$branch($style) "