mirror of https://github.com/ohmyzsh/ohmyzsh.git
fix(af-magic): fix logic for separator with virtualenv (#11518)
parent
aca048814b
commit
b54ef89fab
|
@ -6,7 +6,8 @@
|
||||||
# dashed separator size
|
# dashed separator size
|
||||||
function afmagic_dashes {
|
function afmagic_dashes {
|
||||||
# check either virtualenv or condaenv variables
|
# check either virtualenv or condaenv variables
|
||||||
local python_env="${VIRTUAL_ENV:-$CONDA_DEFAULT_ENV}"
|
local python_env_dir="${VIRTUAL_ENV:-$CONDA_DEFAULT_ENV}"
|
||||||
|
local python_env="${python_env_dir##*/}"
|
||||||
|
|
||||||
# if there is a python virtual environment and it is displayed in
|
# if there is a python virtual environment and it is displayed in
|
||||||
# the prompt, account for it when returning the number of dashes
|
# the prompt, account for it when returning the number of dashes
|
||||||
|
|
Loading…
Reference in New Issue