====== starship ======
Cross-shell prompt. Replaces the bash PS1 with a fast, informative, customisable prompt. Written in Rust.
# initialise in ~/.bashrc:
eval "$(starship init bash)"
===== What It Shows =====
By default (context-aware — only shown when relevant):
* Current directory
* Git branch and status (staged/unstaged/ahead/behind)
* Language version (Python, Node, Rust, Go — detected from project files)
* Command duration (for commands over ~2 seconds)
* Exit code of last command (on failure)
===== Configuration =====
Config: ''~/.config/starship.toml''
[character]
success_symbol = "[➜](bold green)"
error_symbol = "[➜](bold red)"
[git_branch]
symbol = " "
[directory]
truncation_length = 3
Full preset gallery: [[https://starship.rs/presets/|starship.rs/presets]]
===== Install =====
curl -sS https://starship.rs/install.sh | sh
# then add to ~/.bashrc:
eval "$(starship init bash)"
===== See Also =====
* [[terminal:tools:modern_cli_tools|Modern CLI Tools]]
* [[terminal:shell:bashrc|.bashrc]]
* [[terminal:tools:start|Terminal Tools Index]]
* [[terminal:start|Return to terminal]]