C.W.K.
Stream
Lesson 06 of 08 · published

Starship: Cross-Shell Prompt

~8 min · starship, prompt

Level 0Window Tourist
0 XP0/95 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

One prompt for every shell

Already covered in config.lesson6, but worth its own slot in the modern-tools lineup. Starship is a Rust binary that renders a fast, configurable prompt for zsh, bash, fish, nu, and PowerShell — same prompt across every shell you ever use.

Why a Rust binary instead of a shell function

Traditional prompts run shell code on every keystroke (or every line). Slow when you have git status / venv / k8s context / async branches. Starship runs once per prompt, in compiled Rust, with internal concurrency. The visible prompt feels instant even when collecting a dozen facts.

config block essentials

~/.config/starship.toml:

add_newline = true
format = """
$directory$git_branch$git_status$python$nodejs$kubernetes
$character"""

[character]
success_symbol = "[➜](green)"
error_symbol = "[✗](red)"

[git_status]
modified = "!"
untracked = "?"

The format string is the master switch — modules in any order, with newlines and decorations.

Presets

starship preset gruvbox-rainbow -o ~/.config/starship.toml
starship preset nerd-font-symbols -o ~/.config/starship.toml
starship preset pure-preset -o ~/.config/starship.toml

One-line copy commands. presets gallery shows them in screenshots before you commit.

Trade-off vs P10k

Starship works on every shell; P10k is zsh-only but slightly faster and has a beautiful first-time wizard. If you live in zsh and want the shiniest single-shell experience, P10k. Otherwise Starship.

Code

Bare-minimum starship config·toml
# ~/.config/starship.toml
add_newline = true

[character]
success_symbol = "[➜](green)"
error_symbol = "[✗](red)"

[git_status]
ahead = "⇡"
behind = "⇣"
diverged = "⇕"

External links

Exercise

If you skipped config.lesson6, set up Starship now. Pick a preset that fits your taste: starship preset nerd-font-symbols -o ~/.config/starship.toml. cd into a git repo and admire.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.