Update 改良しました→ git のブランチ名 *と作業状態* を zsh の右プロンプトに表示+ status に応じて色もつけてみた - ヤルキデナイズドだった 以下古い情報 こんなんなります。 作業ディレクトリがクリーンなら緑 追跡されていないファイルがあるときは黄色 追跡されているファイルに変更があるときは赤 変更あり+未追跡ファイルありで太字の赤 そんな感じで。 コード # ${fg[...]} や $reset_color をロード autoload -U colors; colors function rprompt-git-current-branch { local name st color if [[ "$PWD" =~ '/\.git(/.*)?$' ]]; then return fi name=$(basename "`git symbolic-ref HE
![git のブランチ名を zsh の右プロンプトに表示+ status に応じて色もつけてみた - ヤルキデナイズドだった](https://cdn-ak-scissors.b.st-hatena.com/image/square/a5666508514091e4e17882f147d96d489881ee3d/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fu%2Fuasi%2F20091018%2F20091018064622.png)