b54ef89fab89eaa62ece588f96d8cbd7c222d854

Author
WaferJay <17383312+WaferJay@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

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

Diff

 1diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme
 2index 1b629e43a50e1ab864729937902d5411835bb2bb..70549d01fd03c996970cc00505bd3ec120a6927c 100644
 3--- a/themes/af-magic.zsh-theme
 4+++ b/themes/af-magic.zsh-theme
 5@@ -6,7 +6,8 @@
 6 # dashed separator size
 7 function afmagic_dashes {
 8   # check either virtualenv or condaenv variables
 9-  local python_env="${VIRTUAL_ENV:-$CONDA_DEFAULT_ENV}"
10+  local python_env_dir="${VIRTUAL_ENV:-$CONDA_DEFAULT_ENV}"
11+  local python_env="${python_env_dir##*/}"
12 
13   # if there is a python virtual environment and it is displayed in
14   # the prompt, account for it when returning the number of dashes