mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
1.7 KiB
1.7 KiB
Starship
Fast and customizable prompt for most shells.
TL;DR
Installation and configuration
# Installation.
brew install 'starship'
zypper in 'starship'
# Start when the shell starts.
eval "$(starship init bash)" | tee -a ~'/.bashrc'
eval "$(starship init zsh)" | tee -a ~'/.zshrc'
echo 'starship init fish | source' | tee -a ~'/.config/fish/config.fish'
# Initialize starship configuration.
mkdir -p ~'/.config' && touch ~'/.config/starship.toml'
# Change configuration.
starship config
vim ~'/.config/starship.toml'
# Print the whole configuration.
starship print-config
cat ~'/.config/starship.toml'
Usage
# List available presets (prompt styles).
starship preset -l
Configuration
# Change configuration.
starship config
vim ~'/.config/starship.toml'
# Print the whole configuration.
starship print-config
cat ~'/.config/starship.toml'
# ~/.config/starship.toml
# Get editor completions based on the config schema.
"$schema" = 'https://starship.rs/config-schema.json'
command_timeout = 750
# Replace the default '❯' symbol in the prompt with '$'.
# The '$' character needs to be escaped.
[character]
success_symbol = '[\$](bold green)'
error_symbol = '[\$](bold red)'