Files
oam/knowledge base/starship.md
2024-01-14 01:33:20 +01:00

1.4 KiB
Raw Blame History

Starship

Fast and customizable prompt for most shells.

  1. TL;DR
  2. Configuration
  3. Further readings
  4. Sources

TL;DR

# Installation.
brew install 'starship'
zypper in 'starship'

# Start when the shell starts.
eval "$(starship init bash)" | tee -a ~'/.bashrc'
echo 'starship init fish | source' | tee -a ~'/.config/fish/config.fish'
eval "$(starship init zsh)" | tee -a ~'/.zshrc'

# Initialize starship configuration.
mkdir -p ~'/.config' && touch ~'/.config/starship.toml'

# List available presets (prompt styles).
starship preset -l

Configuration

# ~/.config/starship.toml

# Get editor completions based on the config schema.
"$schema" = 'https://starship.rs/config-schema.json'

# Replace the default '' symbol in the prompt with '$'.
# The '$' character needs to be escaped.
[character]
success_symbol = '[\$](bold green)'

Further readings

Sources

All the references in the further readings section, plus the following: