diff options
Diffstat (limited to '.config/fish/functions')
-rw-r--r-- | .config/fish/functions/fish_right_prompt.fish | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.config/fish/functions/fish_right_prompt.fish b/.config/fish/functions/fish_right_prompt.fish index 0dbcc37..5963ed9 100644 --- a/.config/fish/functions/fish_right_prompt.fish +++ b/.config/fish/functions/fish_right_prompt.fish | |||
@@ -1,4 +1,4 @@ | |||
1 | function fish_right_prompt -d "Write out the right prompt" | 1 | function fish_right_prompt --description 'Write out the right prompt' |
2 | 2 | ||
3 | if not set -q -g __fish_right_prompt_functions_defined | 3 | if not set -q -g __fish_right_prompt_functions_defined |
4 | set -g __fish_right_prompt_functions_defined | 4 | set -g __fish_right_prompt_functions_defined |
@@ -58,6 +58,7 @@ function fish_right_prompt -d "Write out the right prompt" | |||
58 | set -l yellow (set_color -o yellow) | 58 | set -l yellow (set_color -o yellow) |
59 | set -l red (set_color -o red) | 59 | set -l red (set_color -o red) |
60 | set -l blue (set_color -o blue) | 60 | set -l blue (set_color -o blue) |
61 | set -l green (set_color -o green) | ||
61 | 62 | ||
62 | set -l repo_info | 63 | set -l repo_info |
63 | if set -l repo_type (_repo_type) | 64 | if set -l repo_type (_repo_type) |
@@ -70,6 +71,11 @@ function fish_right_prompt -d "Write out the right prompt" | |||
70 | end | 71 | end |
71 | end | 72 | end |
72 | 73 | ||
74 | set -l virtualenv | ||
75 | if set -q VIRTUAL_ENV | ||
76 | set virtualenv "$green 🐍 " (basename "$VIRTUAL_ENV") | ||
77 | end | ||
78 | |||
73 | set hour $blue(date '+%R') | 79 | set hour $blue(date '+%R') |
74 | echo -n -s $repo_info ' ' $hour | 80 | echo -n -s $virtualenv ' ' $repo_info ' ' $hour |
75 | end | 81 | end |