From 061e2d6835a3b83eaa854bae11cb0627ed114767 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 14 Nov 2021 02:49:45 +0300 Subject: fish: python venv on prompt --- .config/fish/functions/fish_right_prompt.fish | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to '.config/fish/functions') 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 @@ -function fish_right_prompt -d "Write out the right prompt" +function fish_right_prompt --description 'Write out the right prompt' if not set -q -g __fish_right_prompt_functions_defined set -g __fish_right_prompt_functions_defined @@ -58,6 +58,7 @@ function fish_right_prompt -d "Write out the right prompt" set -l yellow (set_color -o yellow) set -l red (set_color -o red) set -l blue (set_color -o blue) + set -l green (set_color -o green) set -l repo_info if set -l repo_type (_repo_type) @@ -70,6 +71,11 @@ function fish_right_prompt -d "Write out the right prompt" end end + set -l virtualenv + if set -q VIRTUAL_ENV + set virtualenv "$green 🐍 " (basename "$VIRTUAL_ENV") + end + set hour $blue(date '+%R') - echo -n -s $repo_info ' ' $hour + echo -n -s $virtualenv ' ' $repo_info ' ' $hour end -- cgit v1.2.3-70-g09d2