0
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-19 04:01:21 +02:00

fix(af-magic): fix logic for separator with virtualenv (#11518)

This commit is contained in:
WaferJay 2023-02-24 05:32:40 +08:00 committed by GitHub
parent aca048814b
commit b54ef89fab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,8 @@
# dashed separator size
function afmagic_dashes {
# 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
# the prompt, account for it when returning the number of dashes