summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorKalle Ahlström <71292737+kahlstrm@users.noreply.github.com>2024-12-30 11:15:05 +0200
committerGitHub <noreply@github.com>2024-12-30 10:15:05 +0100
commitd82669199b5d900b50fd06dd3518c277f0def869 (patch)
tree31d3cee816c80a2f86ed29b410e94cdf215449b6 /themes
parent9c8afcc3ee2fe6da2e2487a623498a9105cbd38c (diff)
downloadzsh-d82669199b5d900b50fd06dd3518c277f0def869.tar.gz
zsh-d82669199b5d900b50fd06dd3518c277f0def869.tar.bz2
zsh-d82669199b5d900b50fd06dd3518c277f0def869.zip
fix(af-magic): add logic for virtualenv separator (#12875)
Diffstat (limited to 'themes')
-rw-r--r--themes/af-magic.zsh-theme2
1 files changed, 2 insertions, 0 deletions
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