From b54ef89fab89eaa62ece588f96d8cbd7c222d854 Mon Sep 17 00:00:00 2001 From: WaferJay <17383312+WaferJay@users.noreply.github.com> Date: Fri, 24 Feb 2023 05:32:40 +0800 Subject: [PATCH] fix(af-magic): fix logic for separator with virtualenv (#11518) --- themes/af-magic.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme index 1b629e43a..70549d01f 100644 --- a/themes/af-magic.zsh-theme +++ b/themes/af-magic.zsh-theme @@ -6,7 +6,8 @@ # dashed separator size function afmagic_dashes { # check either virtualenv or condaenv variables - local python_env="${VIRTUAL_ENV:-$CONDA_DEFAULT_ENV}" + local python_env_dir="${VIRTUAL_ENV:-$CONDA_DEFAULT_ENV}" + local python_env="${python_env_dir##*/}" # if there is a python virtual environment and it is displayed in # the prompt, account for it when returning the number of dashes