浏览代码

fix(af-magic): fix python venv checking logic (#11495)

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

+ 1 - 1
themes/af-magic.zsh-theme

@@ -10,7 +10,7 @@ function afmagic_dashes {
 
   # if there is a python virtual environment and it is displayed in
   # the prompt, account for it when returning the number of dashes
-  if [[ -n "$python_env" && "$PS1" = \(* ]]; then
+  if [[ -n "$python_env" && "$PS1" = *\(${python_env}\)* ]]; then
     echo $(( COLUMNS - ${#python_env} - 3 ))
   else
     echo $COLUMNS