starship-setup

Config for Starship Prompt https://starship.rs/

Show git user email

Very useful when you're working for several organizations with different git settings

Снимок экрана 2021-03-14 в 22 40 39

# ~/.config/starship.toml

format = """
...
$custom\
$cmd_duration\
${custom.git_email}\
$line_break\
...
"""

[custom.git_email]
command = "git config user.email"
when = "git rev-parse --git-dir 2> /dev/null"
format = "by [$output]($style) "
style = "bright-yellow bold"