Starship
Starship は cross-shell の prompt。Git status、言語 version、実行時間などを表示する。10 種類の theme palette を切り替え可能。
Prompt format
Section titled “Prompt format”~/projects/myapp main ✓ ⬢20.10.0 🐹1.213s
❯
左から: directory, git branch, git status, 言語 version。右側に実行時間と exit status。
| Module | 表示 |
|---|---|
| Directory | path (3 segment まで、icon 付き置換) |
| Git branch | branch 名 (20 文字で truncate) |
| Git status | ahead/behind, modified, staged, untracked, conflict |
| Node.js | ⬢ + version |
| Rust | 🦀 + version |
| Go | 🐹 + version |
| Python | 🐍 + version |
| Docker | 🐳 + context |
| Time | HH:MM |
| Duration | 500ms 以上の command のみ表示 |
| Status | exit code (非ゼロのみ) |
Git status の icon
Section titled “Git status の icon”| Icon | 意味 |
|---|---|
✓ | up to date |
✖ | conflict |
⇡N | N commits ahead |
⇣N | N commits behind |
+N | N untracked files |
!N | N modified files |
●N | N staged files |
»N | N renamed files |
✘N | N deleted files |
⚑ | stash あり |
Directory の icon 置換
Section titled “Directory の icon 置換”特定の directory 名を icon に置換して短く表示する。
| Directory | Icon |
|---|---|
| Documents | “ |
| Downloads | “ |
| Music | “ |
| Pictures | “ |
| Developer | “ |
| .config | “ |
Theme palette
Section titled “Theme palette”palette = "catppuccin" で active palette を切り替える。10 種類の palette を定義済み。
| Palette | 雰囲気 |
|---|---|
| Catppuccin | warm な pastel 系 |
| Nord | cool な arctic palette |
| Dracula | dark purple 系 |
| Tokyo Night | deep blue + vibrant |
| Gruvbox | earthy warm tone |
| Everforest | soft green 系 |
| One Dark | VS Code 風 |
| Rosé Pine | muted pink/blue |
| Solarized | 定番の dual-tone |
| Kanagawa | 日本画風 muted color |
各 palette は pink, red, yellow, green, sky, sapphire, blue, overlay2 の 8 色を定義。module の style がこれらの色名を参照する。
theme-switch コマンドで palette 名を切り替える。Starship は config の変更を自動で検知するため、prompt を開き直せば反映される。
設定ファイル
Section titled “設定ファイル”~/.config/starship/starship.tomlcommand_timeout は 2000ms に設定 (default の 500ms だと git 操作が timeout しやすい)。