summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorshelfofclub <zhouxiaofeng2907@outlook.com>2023-02-14 20:44:23 +0800
committerGitHub <noreply@github.com>2023-02-14 13:44:23 +0100
commit69b5737daf0448ad7e6686174638be74f86afdec (patch)
treebda012f46825c7b5db10b46b13f34c3dca6c311f /themes
parent416560c9bf0c03afe6f576ab9e420256843bfb8b (diff)
downloadzsh-69b5737daf0448ad7e6686174638be74f86afdec.tar.gz
zsh-69b5737daf0448ad7e6686174638be74f86afdec.tar.bz2
zsh-69b5737daf0448ad7e6686174638be74f86afdec.zip
fix(af-magic): fix python venv checking logic (#11495)
Diffstat (limited to 'themes')
-rw-r--r--themes/af-magic.zsh-theme2
1 files changed, 1 insertions, 1 deletions
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