summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParintorn Thammasitboon <159538649+parintorn0@users.noreply.github.com>2025-08-01 15:08:48 +0700
committerGitHub <noreply@github.com>2025-08-01 10:08:48 +0200
commita6beb0f5958e935d33b0edb6d4470c3d7c4e8917 (patch)
tree40bcb89a7d522796ef09351ccfb3123195fe98dc
parent5c804257ceb5b3062b876afae290adf72c474aad (diff)
downloadzsh-a6beb0f5958e935d33b0edb6d4470c3d7c4e8917.tar.gz
zsh-a6beb0f5958e935d33b0edb6d4470c3d7c4e8917.tar.bz2
zsh-a6beb0f5958e935d33b0edb6d4470c3d7c4e8917.zip
feat(jonathan): add conda support (#13243)
-rw-r--r--themes/jonathan.zsh-theme9
1 files changed, 5 insertions, 4 deletions
diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme
index da6ed2281..5185ebf77 100644
--- a/themes/jonathan.zsh-theme
+++ b/themes/jonathan.zsh-theme
@@ -8,14 +8,15 @@ function theme_precmd {
local rubypromptsize=${#${(%)$(ruby_prompt_info)}}
local pwdsize=${#${(%):-%~}}
local venvpromptsize=$((${#$(virtualenv_prompt_info)}))
+ local condapromptsize=$((${#$(conda_prompt_info)}))
# Truncate the path if it's too long.
- if (( promptsize + rubypromptsize + pwdsize + venvpromptsize > TERMWIDTH )); then
+ if (( promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize > TERMWIDTH )); then
(( PR_PWDLEN = TERMWIDTH - promptsize ))
elif [[ "${langinfo[CODESET]}" = UTF-8 ]]; then
- PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${PR_HBAR}:)}"
+ PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize ) ))::${PR_HBAR}:)}"
else
- PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}"
+ PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}"
fi
}
@@ -104,7 +105,7 @@ fi
PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\
${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(\
${PR_GREEN}%${PR_PWDLEN}<...<%~%<<\
-${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\
+${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)$(conda_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\
${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l\
${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER}\