summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorWaferJay <17383312+WaferJay@users.noreply.github.com>2023-02-24 05:32:40 +0800
committerGitHub <noreply@github.com>2023-02-23 22:32:40 +0100
commitb54ef89fab89eaa62ece588f96d8cbd7c222d854 (patch)
tree07c024c783d15567bc1caffa45ee793c21865741 /themes
parentaca048814b2462501ab82938ff2473661182fffb (diff)
downloadzsh-b54ef89fab89eaa62ece588f96d8cbd7c222d854.tar.gz
zsh-b54ef89fab89eaa62ece588f96d8cbd7c222d854.tar.bz2
zsh-b54ef89fab89eaa62ece588f96d8cbd7c222d854.zip
fix(af-magic): fix logic for separator with virtualenv (#11518)
Diffstat (limited to 'themes')
-rw-r--r--themes/af-magic.zsh-theme3
1 files changed, 2 insertions, 1 deletions
diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme
index 1b629e43a..70549d01f 100644
--- a/themes/af-magic.zsh-theme
+++ b/themes/af-magic.zsh-theme
@@ -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