diff options
author | Adrian Kummerlaender | 2016-06-19 16:52:06 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2016-06-19 16:52:06 +0200 |
commit | 32e6b0368c9efeb05131cb07795bc0abf0cc3cd9 (patch) | |
tree | 1bbd7b57315eb4f19d3954b41f7d4e18476ad73e | |
parent | cc6c4e01ffab77681d8fd6989580ce9c5c4957c3 (diff) | |
download | dotfiles-32e6b0368c9efeb05131cb07795bc0abf0cc3cd9.tar dotfiles-32e6b0368c9efeb05131cb07795bc0abf0cc3cd9.tar.gz dotfiles-32e6b0368c9efeb05131cb07795bc0abf0cc3cd9.tar.bz2 dotfiles-32e6b0368c9efeb05131cb07795bc0abf0cc3cd9.tar.lz dotfiles-32e6b0368c9efeb05131cb07795bc0abf0cc3cd9.tar.xz dotfiles-32e6b0368c9efeb05131cb07795bc0abf0cc3cd9.tar.zst dotfiles-32e6b0368c9efeb05131cb07795bc0abf0cc3cd9.zip |
Add `virtualfish` to fish config, prompt
-rw-r--r-- | fish/.config/fish/config.fish | 1 | ||||
-rw-r--r-- | fish/.config/fish/functions/fish_prompt.fish | 10 | ||||
-rw-r--r-- | fish/.config/fish/functions/fish_right_prompt.fish | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index f7fd5a4..c1d41a4 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -11,3 +11,4 @@ alias dict='sdcv' alias mp3-dl='youtube-dl --extract-audio --audio-format mp3' eval (dircolors -c ~/.dir_colors) +eval (python -m virtualfish) diff --git a/fish/.config/fish/functions/fish_prompt.fish b/fish/.config/fish/functions/fish_prompt.fish index 4a0c974..80804ed 100644 --- a/fish/.config/fish/functions/fish_prompt.fish +++ b/fish/.config/fish/functions/fish_prompt.fish @@ -23,6 +23,10 @@ function fish_prompt echo -n -s 'λ ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" + if set -q VIRTUAL_ENV + echo -n -s ' (' (basename "$VIRTUAL_ENV") ') ' + end + if test $last_status -gt 0 set_color $fish_color_cwd_root echo -n -s ' ‣ ' @@ -31,9 +35,3 @@ function fish_prompt echo -n -s ' ‣ ' end end - -function fish_right_prompt - set_color $fish_color_autosuggestion - date '+%H:%M:%S' - set_color normal -end diff --git a/fish/.config/fish/functions/fish_right_prompt.fish b/fish/.config/fish/functions/fish_right_prompt.fish new file mode 100644 index 0000000..6bcfd23 --- /dev/null +++ b/fish/.config/fish/functions/fish_right_prompt.fish @@ -0,0 +1,5 @@ +function fish_right_prompt + set_color $fish_color_autosuggestion + date '+%H:%M:%S' + set_color normal +end |