Starship Cross-shell prompt
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
curl -sS https://starship.rs/install.sh | sh
eval "$(starship init bash)"
eval "$(starship init zsh)"
starship init fish | source
starship configstarship preset --list
starship explain
starship timings
Concepts
- Shell rc file runs starship init
- starship prompt detects context
- starship.toml format + modules
- Your prompt git, dir, versions
Install and init
curl -sS https://starship.rs/install.sh | sh
brew install starship
eval "$(starship init bash)"
eval "$(starship init zsh)"
starship init fish | source
Invoke-Expression (&starship init powershell)
starship init nu | save -f <autoload-file>
curl -sS https://starship.rs/install.sh | sh -s -- -b
~/.local/bin
Config file
~/.config/starship.toml
export STARSHIP_CONFIG=<path>
starship configstarship config <key> <value>
starship print-config
starship print-config <module>
Format strings
| Write | Meaning |
|---|---|
$name |
Insert variable or module |
[text](style) |
Styled text group |
(...) |
Hide if all variables inside are empty |
\$ \[ \] |
Escape literal characters |
format = '$all'
right_format = '$time'
add_newline = false
palette = '<name>'
bold fg:green bg:#1e1e2e
Modules
success_symbol = '[❯](bold green)'
error_symbol = '[❯](bold red)'
[directory] truncation_length = 3
[git_status] ahead = '⇡'
conflicted modified staged untracked
[cmd_duration] min_time = 2_000
[time] disabled = false
[username] show_always = true
[status] disabled = false
[nodejs] disabled = true
Custom modules
[custom.<name>]
command = 'git rev-parse --short HEAD'
Debug and tuning
starship explain
starship timings
starship module <name>
starship prompt --status=<n> --jobs=<n>
Presets
starship preset --list
starship preset <name> -o
~/.config/starship.toml
starship preset <name> -o <file> -f
starship preset <name>
no-runtimesRecipes
# ~/.config/starship.tomladd_newline = falseformat = "$directory$git_branch$character"
format = "$character"right_format = "$all"# zsh: ZLE_RPROMPT_INDENT=0 removes the gap
palette = "night"[palettes.night]blue = "#7aa2f7"[directory]style = "bold blue"
starship timingsstarship config command_timeout 1000starship config nodejs.disabled true



