é©å¿ã¯é©å¿åãé»å®³ãã
ã¯ããã«
éçºç°å¢ã®æé©åã¯ãç¾ä»£ã®ã½ããã¦ã§ã¢éçºã«ããã¦éè¦ãªèª²é¡ã§ããã¾ãããã®æ´æ°ã«ã¯å¼å¹´é·å®®ã®ããã«ãå®æçãªå·æ°ã«ã¯æè¡ã®ç¶æ¿ã¨é©æ°ã¨ããäºã¤ã®å´é¢ãããã¾ããããããé度ãªé©å¿ã¯é©å¿åãé»å®³ããã¨ããé説ãããã¾ãããã®è¦ç¹ãããç§ã¯éçºç°å¢ãå®æçã«è¦ç´ããå¿ è¦ãªå¤æ´ãå ãã¦ãã¾ãã
æ¨å¹´ããã®ä¸ç°ã¨ãã¦ã¿ã¼ããã«ã¨ãã¥ã¬ã¼ã¿ãWarpã«ç§»è¡ãã¾ãããWarpã¯æ´ç·´ãããUIã¨åªããæ©è½æ§ãåããAIã«ããã³ãã³ãææ¡ããããã¯ãã¼ã¹ã®åºå表示ãªã©ãã¢ãã³ãªæ©è½ã«ããéçºå¹çã大ããåä¸ããã¦ããã¾ããã
2025å¹´ãè¿ããæ°ããªæ¹åã¨ãã¦éçºç°å¢ã®ãããªãæé©åãç®æãã¦ãã¾ããç¹ã«æ³¨ç®ããã®ããæ¥ã ã®éçºä½æ¥ã§æãé »ç¹ã«ç®ã«ããã¿ã¼ããã«ã®ããã³ããã§ãããã詳細ãªéçºç°å¢ã®ç¶æ ææ¡ãå®ç¾ãããããé«éã§ã«ã¹ã¿ãã¤ãºæ§ã®é«ãã¯ãã¹ã·ã§ã«ããã³ãããstarshipãã®å°å ¥ã決ãã¾ããã
ãã®è¨äºã§ã¯ãFishã·ã§ã«ããã¼ã¹ã«ããstarshipã®å°å ¥éç¨ã¨ãå ·ä½çãªè¨å®å 容ãå ±æãã¾ããã¾ããWarpã¨Fishãããã¦starshipã®çµã¿åãããããããç¸ä¹å¹æã«ã¤ãã¦ã詳ãã解説ãã¦ããã¾ãã
starshipã®ç¹å¾´ã¨é¸æçç±
starshipã¯ãä»»æã®ã·ã§ã«ã§åä½ãããé«éã§æè»ãªããã³ããã§ããRustã§æ¸ããã¦ãããã·ã¹ãã ãªã½ã¼ã¹ãæå°éã«æããªãããè±å¯ãªæ å ±ã表示ã§ãããã¨ãç¹å¾´ã§ããç§ãstarshipãé¸æãã主ãªçç±ã¯ä»¥ä¸ã®ç¹ã§ãã
ã¾ããã¯ãã¹ã·ã§ã«å¯¾å¿ã¨ããç¹å¾´ãé åçã§ãããéçºç°å¢ã«ãã£ã¦bashãzshãfishãªã©ç°ãªãã·ã§ã«ã使ç¨ãããã¨ãããã¾ãããstarshipãªãã°ä¸ã¤ã®è¨å®ãã¡ã¤ã«ã§ãã¹ã¦ã®ã·ã§ã«ã§åãè¦ãç®ã¨æ©è½ãå®ç¾ã§ãã¾ãã
次ã«ãRustã§å®è£ ããã¦ããã¨ããç¹ãéè¦ã§ãããã·ã§ã«ã®èµ·åæãããã³ããã®æ´æ°æã®ããã©ã¼ãã³ã¹ãåªãã¦ãããã¹ãã¬ã¹ãªã使ç¨ã§ãã¾ããç¹ã«å¤§è¦æ¨¡ãªGitãªãã¸ããªã§ã®ä½æ¥æã§ããããã³ããã®æ´æ°ã«ããé 延ãã»ã¨ãã©æãã¾ããã
ã¾ããã¢ã¸ã¥ã¼ã«å¼ã®è¨è¨ã«ãããå¿ è¦ãªæ å ±ã ããé¸æãã¦è¡¨ç¤ºã§ããç¹ãæ°ã«å ¥ã£ã¦ãã¾ããéçºè¨èªããã¼ã«ã®è¿½å ã»åé¤ã容æã§ãç°å¢ã®å¤åã«åããã¦æè»ã«å¯¾å¿ã§ãã¾ãã
ã¤ã³ã¹ãã¼ã«ã¨åæè¨å®
ç§ã¯æ®æ®µããFishã·ã§ã«ã使ç¨ãã¦ãããããã¾ãFishã®ã¤ã³ã¹ãã¼ã«ç¶æ³ã確èªãã¾ãããmacOSã§ã¯Homebrewã使ã£ã¦Fishãã¤ã³ã¹ãã¼ã«ãã¦ãã¾ãã
brew install fish
ç¶ãã¦ãstarshipãHomebrewã§ã¤ã³ã¹ãã¼ã«ãã¾ããï¼
brew install starship
ãªããä»ã®OSç°å¢ã§ã¯å ¬å¼ã®ã¤ã³ã¹ãã¼ã«ã¹ã¯ãªããã使ç¨ãããã¨ãã§ãã¾ãã
curl -sS https://starship.rs/install.sh | sh
Fishã·ã§ã«ã®å ´åã~/.config/fish/config.fish
ã®æ«å°¾ã«ä»¥ä¸ã®åæåã³ã¼ãã追å ãã¾ãã
starship init fish | source
ãã®è¨å®ã«ãããFishã·ã§ã«ã®èµ·åæã«èªåçã«starshipãåæåããã¾ããç§ã®å ´åãæ¢ã«Fishã®è¨å®ãã¡ã¤ã«ã«ã¯ãã¼ããã¨ã¤ãªã¢ã¹ãªã©ã®è¨å®ãå«ã¾ãã¦ãã¾ããããstarshipã¯ãããã¨ç«¶åãããã¨ãªãåä½ãã¦ãã¾ããç¹ã«ãFishã®æã¤æ§æãã¤ã©ã¤ããè£å®æ©è½ã¨ã®ç¸æ§ãè¯ããå¿«é©ãªéçºç°å¢ãå®ç¾ã§ãã¦ãã¾ãã
ããã³ããã®è©³ç´°è¨å®
starshipã®è¨å®ã¯~/.config/starship.toml
ã§è¡ãã¾ããç§ã®è¨å®ã§ã¯ãéçºã§ä½¿ç¨ããæ§ã
ãªãã¼ã«ã®ç¶æ
ãè¦è¦çã«ææ¡ã§ããããã«å·¥å¤«ãã¦ãã¾ãã
ãã以å¤ã«ãè¨å®ã®ãµã³ãã«ãããã®ä½¿ã£ã¦ã¿ãããåèã«ãã¦ãããããã§ãã
ããã³ããã®ã¬ã¤ã¢ã¦ãè¨å®
formatã»ã¯ã·ã§ã³ã§ã¯ãããã³ããã®å ¨ä½çãªæ§é ãå®ç¾©ãã¦ãã¾ãããã¯ã¼ã©ã¤ã³é¢¨ã®ãã¶ã¤ã³ãæ¡ç¨ããåã¢ã¸ã¥ã¼ã«éãç¢å°ã§æ»ããã«æ¥ç¶ãã¦ãã¾ãã
format = """ [](fg:#9A348E)\ $directory\ [](fg:#DA627D bg:#9A348E)\ $git_branch\ $git_status\ [](fg:#FCA17D bg:#DA627D)\ $kubernetes\ [](fg:#86BBD8 bg:#FCA17D)\ $aws\ ...
ãã®ããã«ãåã»ã°ã¡ã³ãã®èæ¯è²ãåå¾ã§èª¿æ´ãããã¨ã§ãç¢å°åã®ã¤ãªãç®ãå®ç¾ãã¦ãã¾ããè²ã¯ãè¦èªæ§ã¨ã¢ã¯ã»ã·ããªãã£ãèæ ®ãã¦é¸æãã¾ããã
ãã£ã¬ã¯ããªè¡¨ç¤ºã®æé©å
ã«ã¬ã³ããã£ã¬ã¯ããªã®è¡¨ç¤ºã¯ãéçºä½æ¥ã«ããã¦æãåºæ¬çãªæ å ±ã§ãã
[directory] style = "fg:#E4E4E4 bg:#9A348E" format = '[ $path ]($style)' truncation_length = 3 truncation_symbol = "â¦/"
truncation_length = 3
ã®è¨å®ã«ããããã£ã¬ã¯ããªã®æ·±ãã3é層ãè¶
ããå ´åã¯èªåçã«çç¥ããã¾ããããã«ãããé·ããã¹ã§ãããã³ããã横ã«åºããããããã¨ãé²ãã§ãã¾ããã¾ããtruncation_symbol = "â¦/"
ã§çç¥é¨åãç´æçã«è¡¨ç¾ãã¦ãã¾ãã
Gitæ å ±ã®è©³ç´°è¡¨ç¤º
Gité¢é£ã®æ å ±ã¯ãéçºä½æ¥ã«ããã¦ç¹ã«éè¦ã§ãã
[git_branch] symbol = " " style = "fg:#E4E4E4 bg:#DA627D" format = '[ $symbol$branch ]($style)' [git_status] style = "fg:#E4E4E4 bg:#DA627D" format = '[$all_status$ahead_behind ]($style)' conflicted = "â " ahead = "â¡${count}" behind = "â£${count}" diverged = "â" untracked = "±${count}" stashed = "â»" modified = "!${count}" staged = "+${count}" renamed = "»${count}" deleted = "Ã${count}"
Gitã®ç¶æ ãç´æçãªã¢ã¤ã³ã³ã§è¡¨ç¾ãããã¨ã§ããªãã¸ããªã®ç¶æ ãä¸ç®ã§ææ¡ã§ãã¾ããç¹ã«ä»¥ä¸ã®ç¶æ ãéè¦ãã¦ãã¾ãã
- ã³ã³ããªã¯ãã®çºçï¼â ï¼
- ããã·ã¥ã»ãã«å¾ ã¡ã®å¤æ´ï¼â¡/â£ï¼
- ä½æ¥ãã£ã¬ã¯ããªã®ç¶æ ï¼æªè¿½è·¡ãå¤æ´ãã¹ãã¼ã¸ã³ã°ï¼
- ã¹ã¿ãã·ã¥ã®åå¨ï¼â»ï¼
ãããã®æ å ±ãã³ã³ãã¯ãã«è¡¨ç¤ºãããã¨ã§ãGitæä½ã®ãã¹ãé²ããå¹ççãªä½æ¥ãå®ç¾ãã¦ãã¾ãã
ã¯ã©ã¦ãã¨éçºç°å¢ã®ç¶æ 表示
ç¾ä»£ã®éçºã§ã¯ãè¤æ°ã®ã¯ã©ã¦ããµã¼ãã¹ãã³ã³ããç°å¢ã使ç¨ãããã¨ãä¸è¬çã§ãã
[kubernetes] symbol = "⸠" style = "fg:#E4E4E4 bg:#FCA17D" format = '[ $symbol$context(\($namespace\)) ]($style)' disabled = false [aws] symbol = "â " style = "fg:#E4E4E4 bg:#86BBD8" format = '[ $symbol($profile)(\($region\)) ]($style)' disabled = false [docker_context] symbol = "ð " style = "fg:#E4E4E4 bg:#33658A" format = '[ $symbol$context ]($style)'
ãããã®è¨å®ã«ããã以ä¸ã®æ å ±ã常ã«ææ¡ã§ãã¾ãã
- Kubernetesã®ã³ã³ããã¹ãã¨ãã¼ã ã¹ãã¼ã¹
- AWSã¨Google Cloud ãããã¡ã¤ã«ã¨ãªã¼ã¸ã§ã³
- Dockerã®ã³ã³ããã¹ã
ç¹ã«ãã«ãã¯ã©ã¦ãç°å¢ã§ã®ä½æ¥æã«ã誤ã£ãç°å¢ã§æä½ãã¦ãã¾ããªã¹ã¯ã軽æ¸ã§ãã¾ãã
ããã°ã©ãã³ã°è¨èªã¨ãã¼ã«ã®ãã¼ã¸ã§ã³è¡¨ç¤º
åããã°ã©ãã³ã°è¨èªããã¼ã«ã®ãã¼ã¸ã§ã³æ å ±ããããã¸ã§ã¯ããã¨ã«é©åã«è¡¨ç¤ºããã¾ãã
[golang] symbol = "ð¹ " style = "fg:#E4E4E4 bg:#06969A" format = '[ $symbol($version) ]($style)' [python] symbol = "ð " style = "fg:#E4E4E4 bg:#1B9F62" format = '[ $symbol($version) ]($style)' detect_extensions = ["py"] python_binary = ["python", "python3"] [nodejs] symbol = "⬢ " style = "fg:#E4E4E4 bg:#33658A" format = '[ $symbol($version) ]($style)' detect_extensions = ["js", "ts", "tsx"] detect_files = ["package.json", "tsconfig.json"] [rust] symbol = "â " style = "fg:#E4E4E4 bg:#86BBD8" format = '[ $symbol($version) ]($style)' detect_extensions = ["rs"] detect_files = ["Cargo.toml", "Cargo.lock"]
åè¨èªã®è¨å®ã§ã¯ã以ä¸ã®ç¹ã«æ³¨æãæã£ã¦ãã¾ãã
- é©åãªãã¡ã¤ã«æ¤åºè¨å®(èªç¥ã追ãã¤ããªãé¨åãåæã«åå¾ã§ããããã«)
- ããããããã¢ã¤ã³ã³ã®é¸æ(ç°å¢ãééã£ã¦æ»ãªãªãããã«)
- ãã¼ã¸ã§ã³æ å ±ã®æ確ãªè¡¨ç¤º(ãã¼ã¸ã§ã³ã®åéãã§æ³£ããªãããã«)
ã¾ããTerraformãGoogle Cloudãªã©ã®ã¤ã³ãã©é¢é£ãã¼ã«ãåæ§ã«è¨å®ãã¦ãã¾ãã
[terraform] symbol = "ð " style = "fg:#E4E4E4 bg:#06969A" format = '[ $symbol$workspace ]($style)' [gcloud] symbol = "ð " style = "fg:#E4E4E4 bg:#33658A" format = '[ $symbol$account(@$domain)(\($project\)) ]($style)'
æå»è¡¨ç¤ºã¨ããã³ããæå
ä½æ¥æéã®ç®¡çããã³ãã³ãå®è¡æå»ã®è¨é²ã®ããã«ãæå»è¡¨ç¤ºãå«ãã¦ãã¾ãã
[time] disabled = false time_format = "%R" style = "fg:#E4E4E4 bg:#86BBD8" format = '[ $time ]($style)' [character] success_symbol = "â¯" error_symbol = "â¯" vimcmd_symbol = "â®"
24æéå½¢å¼ã§æå»ã表示ããã³ãã³ãã®å®è¡ç¶æ ã«å¿ãã¦ããã³ããæåãå¤æ´ãã¾ããç¹ã«vimã¢ã¼ãã使ç¨ãã¦ããå ´åã¯ãã¢ã¼ãã®åãæ¿ããä¸ç®ã§ãããããã«ãªã£ã¦ãã¾ãã
ãããã«
starshipãå°å ¥ãã¦ä¸é±éãçµéãã¾ããããstarshipã®å°å ¥ã«ãããéçºç°å¢ã®è¦èªæ§ã¨æä½æ§ã大ããåä¸ãã¾ãããæ°å¹´ãè¿ããã«ããã£ã¦ã®ç°å¢æ´åã¨ãã¦ãé常ã«æºè¶³ã®ããé¸æã ã£ãã¨æãã¦ãã¾ãã
ãã®è¨å®ã¯ãç§ã®éçºã¹ã¿ã¤ã«ã«åããã¦æé©åãããã®ã§ãããstarshipã®æè»ãªè¨å®ã·ã¹ãã ãæ´»ç¨ãããã¨ã§ã誰ã§ãèªåã«æé©ãªéçºç°å¢ãæ§ç¯ã§ãã¾ãããã²çããããèªåã®ä½æ¥ã¹ã¿ã¤ã«ã«åãããã«ã¹ã¿ãã¤ãºã試ãã¦ã¿ã¦ãã ããã
è¨å®ãã¡ã¤ã«ã¯å ¬éãã¦ãã¾ãã®ã§ãåèã«ãã¦ããã ããã°å¹¸ãã§ããã¾ããä»å¾ãéçºç°å¢ã®æ¹åãç¶ããããã«å¹ççãªéçºç°å¢ãç®æãã¦ããããã¨æãã¾ãã