From d82669199b5d900b50fd06dd3518c277f0def869 Mon Sep 17 00:00:00 2001 From: Kalle Ahlström <71292737+kahlstrm@users.noreply.github.com> Date: Mon, 30 Dec 2024 11:15:05 +0200 Subject: fix(af-magic): add logic for virtualenv separator (#12875) --- themes/af-magic.zsh-theme | 2 ++ 1 file changed, 2 insertions(+) (limited to 'themes/af-magic.zsh-theme') diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme index 70549d01f..668c4e5de 100644 --- a/themes/af-magic.zsh-theme +++ b/themes/af-magic.zsh-theme @@ -13,6 +13,8 @@ function afmagic_dashes { # the prompt, account for it when returning the number of dashes if [[ -n "$python_env" && "$PS1" = *\(${python_env}\)* ]]; then echo $(( COLUMNS - ${#python_env} - 3 )) + elif [[ -n "$VIRTUAL_ENV_PROMPT" && "$PS1" = *${VIRTUAL_ENV_PROMPT}* ]]; then + echo $(( COLUMNS - ${#VIRTUAL_ENV_PROMPT} )) else echo $COLUMNS fi -- cgit v1.2.3-70-g09d2 From cb72d7dcbf08b435c7f8a6470802b207b2aa02c3 Mon Sep 17 00:00:00 2001 From: Kalle Ahlström <71292737+kahlstrm@users.noreply.github.com> Date: Sun, 29 Jun 2025 18:11:47 +0300 Subject: fix(af-magic): fix venv prompt counting parenthesis (#13190) --- themes/af-magic.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes/af-magic.zsh-theme') diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme index 668c4e5de..f47d37340 100644 --- a/themes/af-magic.zsh-theme +++ b/themes/af-magic.zsh-theme @@ -14,7 +14,7 @@ function afmagic_dashes { if [[ -n "$python_env" && "$PS1" = *\(${python_env}\)* ]]; then echo $(( COLUMNS - ${#python_env} - 3 )) elif [[ -n "$VIRTUAL_ENV_PROMPT" && "$PS1" = *${VIRTUAL_ENV_PROMPT}* ]]; then - echo $(( COLUMNS - ${#VIRTUAL_ENV_PROMPT} )) + echo $(( COLUMNS - ${#VIRTUAL_ENV_PROMPT} - 3 )) else echo $COLUMNS fi -- cgit v1.2.3-70-g09d2