浏览代码

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

WaferJay 1 年之前
父节点
当前提交
b54ef89fab
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      themes/af-magic.zsh-theme

+ 2 - 1
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