From 69b5737daf0448ad7e6686174638be74f86afdec Mon Sep 17 00:00:00 2001 From: shelfofclub Date: Tue, 14 Feb 2023 20:44:23 +0800 Subject: [PATCH] fix(af-magic): fix python venv checking logic (#11495) --- themes/af-magic.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme index 2ef9b02d7..1b629e43a 100644 --- a/themes/af-magic.zsh-theme +++ b/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