File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,12 @@ function ps1_real() {
85
85
# fi
86
86
87
87
# load venv
88
+ if [ -e " ${VIRTUAL_ENV} " ]; then
89
+ if [[ ! " $( pwd) " =~ " $( dirname ${VIRTUAL_ENV} ) " .* ]]; then
90
+ echo " Leaving Python Virtual Environment."
91
+ deactivate
92
+ fi
93
+ fi
88
94
if [ ! -e " ${VIRTUAL_ENV} " ]; then
89
95
source $( _find_venv) & > /dev/null
90
96
fi
@@ -93,7 +99,7 @@ function ps1_real() {
93
99
94
100
# get the python virtualenv
95
101
if [ " $VIRTUAL_ENV " != " " ]; then
96
- venv=$( basename $( dirname $VIRTUAL_ENV ) ) / $( basename $VIRTUAL_ENV )
102
+ venv=$( echo $( basename $VIRTUAL_ENV ) | grep -v ' ^\. ' || echo $( basename $( dirname $ VIRTUAL_ENV) ) )
97
103
PS1_VENV=" ${_BG_YELLOW}${_FG_CYAN} [ ${venv} ]"
98
104
elif [ " $CONDA_PROMPT_MODIFIER " != " " ]; then
99
105
PS1_VENV=" ${_BG_YELLOW}${_FG_CYAN} ${CONDA_PROMPT_MODIFIER} "
Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ hi NonText ctermbg=none
53
53
54
54
" show line number and lengths
55
55
set number " show line number
56
- set tw = 79 " width of document
56
+ set tw = 119 " width of document
57
57
set nowrap " don't automatically wrap on load
58
58
set fo -= t " don't automatically wrap while typing
59
- set colorcolumn = 79
59
+ set colorcolumn = 119
60
60
highlight ColorColumn ctermbg= 233
61
61
62
62
" paragraph formatting
You can’t perform that action at this time.
0 commit comments