Created
December 17, 2020 02:03
-
-
Save zsimic/56159dff3a6c55b21573a974e2c8cf07 to your computer and use it in GitHub Desktop.
startship.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My config for https://starship.rs/ | |
# It's minimalistic, I like single-line prompts, features: | |
# - show active python version when non-system python is on PATH | |
# - show duration only when last command took more than 5s | |
format="$cmd_duration$custom$directory$character" | |
add_newline = false | |
[directory] | |
format = "[$path]($style)[$read_only]($read_only_style)" | |
style = "yellow" | |
truncate_to_repo = false | |
truncation_length = 5 | |
truncation_symbol="β¦/" | |
[character] | |
success_symbol = "[:](bold green)" | |
error_symbol = "[:](bold red)" | |
# Show duration for commands that took more than 5s only | |
[cmd_duration] | |
format = "[took $duration]($style)\n" | |
min_time = 5000 | |
show_milliseconds = false | |
style = "dimmed" | |
# Using a custom format to highlight current non-system python in a compact manner | |
# - π: python from virtual env is active | |
# - π¦: python from pyenv is active | |
[custom.py] | |
command = """ pv=$(python --version | grep -Eo "\\d+\\.\\d+"); if [ -n "$VIRTUAL_ENV" ]; then echo "π $pv"; else echo "π¦ $pv"; fi """ | |
format = "[$output]($style) " | |
style = "blue" | |
when = """ test -n "$VIRTUAL_ENV" || echo $PATH | grep /pyenv/ """ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment