diff options
author | Yigit Sever | 2021-11-14 02:49:45 +0300 |
---|---|---|
committer | Yigit Sever | 2021-11-14 02:49:45 +0300 |
commit | 061e2d6835a3b83eaa854bae11cb0627ed114767 (patch) | |
tree | 01f5bc4fcba85aebce2ead02eac3795ebe33b385 /.config/fish/functions | |
parent | 34966f345bee30f36ee82b995dcc829b01705c2e (diff) | |
download | dotfiles-061e2d6835a3b83eaa854bae11cb0627ed114767.tar.gz dotfiles-061e2d6835a3b83eaa854bae11cb0627ed114767.tar.bz2 dotfiles-061e2d6835a3b83eaa854bae11cb0627ed114767.zip |
fish: python venv on prompt
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 |