File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ function __powerline_python_virtual_env_prompt {
8989 local color=${VIRTUAL_ENV_PROMPT_COLOR}
9090 local venv_info=" "
9191 if [[ " $venv_path " != " " ]]; then
92-
92+ venv_info= $( basename $venv_path )
9393 if [[ -f " venv/pyvenv.cfg" ]]; then
9494 shopt -s extglob
9595 configfile=" venv/pyvenv.cfg" # set the actual path name of your (DOS or Unix) config file
@@ -105,13 +105,15 @@ function __powerline_python_virtual_env_prompt {
105105 fi
106106 fi
107107 done < $configfile
108- eval prompt= $prompt
109- venv_info= " $prompt "
108+ if [[ -v prompt ]]; then
109+ eval prompt=$prompt
110+ venv_info=" $prompt "
111+ fi
110112 else
111113 venv_info= $( basename ${venv_path} )
112114 fi
113115 fi
114- [[ -n " ${venv_info} " ]] && echo " ${venv_info} |${color} "
116+ [[ -n " ${venv_info} " ]] && echo " ${PADDING} ( ${ venv_info} ) ${PADDING } |${color} "
115117}
116118
117119function __powerline_user_info_prompt {
You can’t perform that action at this time.
0 commit comments