diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-11-16 14:15:39 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-11-16 14:15:39 +0100 |
commit | a63880722047e6bca33a6babf2291547280fb1c0 (patch) | |
tree | 0738a38fad8a1450b09caea902082dd3bcc847c7 /bash | |
parent | 1cc406ce8bd6c2123eb390598d2bca4e217e5b29 (diff) | |
download | dotfiles-a63880722047e6bca33a6babf2291547280fb1c0.tar.gz |
prompt venv
Diffstat (limited to 'bash')
-rw-r--r-- | bash/prompt.bash | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bash/prompt.bash b/bash/prompt.bash index c4c77fc..9e74155 100644 --- a/bash/prompt.bash +++ b/bash/prompt.bash @@ -3,12 +3,14 @@ function prompt_command () { local EXIT="$?" local REMOTE="" + local VENV="" [ $EXIT -eq 0 ] && EXIT="" [ ! -z "$SSH_CONNECTION" ] && REMOTE="${orange}[R] " + [ -z "$VIRTUAL_ENV" ] || VENV="$(basename "$VIRTUAL_ENV")" #PS1="\n${REMOTE}${cyan}\h:$(virtualenv_prompt) ${reset_color} ${yellow}\w ${green}$(scm_prompt_info)\n${red}${EXIT} ${reset_color}→ " - PS1="\n${REMOTE}${cyan}\h: ${reset_color} ${yellow}\w \n${red}${EXIT} ${reset_color}→ " + PS1="\n${REMOTE}${cyan}\h: ${reset_color} ${yellow}\w ${green}${VENV}\n${red}${EXIT} ${reset_color}→ " } PROMPT_COMMAND=prompt_command |