a6beb0f5958e935d33b0edb6d4470c3d7c4e8917
- Author
- Parintorn Thammasitboon <159538649+parintorn0@users.noreply.github.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
feat(jonathan): add conda support (#13243)
Diff
1diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme
2index da6ed2281d7795c5f98c06289c6de59c32fa26ff..5185ebf77d983c28e01f535124518c077af8a571 100644
3--- a/themes/jonathan.zsh-theme
4+++ b/themes/jonathan.zsh-theme
5@@ -8,14 +8,15 @@ function theme_precmd {
6 local rubypromptsize=${#${(%)$(ruby_prompt_info)}}
7 local pwdsize=${#${(%):-%~}}
8 local venvpromptsize=$((${#$(virtualenv_prompt_info)}))
9+ local condapromptsize=$((${#$(conda_prompt_info)}))
10
11 # Truncate the path if it's too long.
12- if (( promptsize + rubypromptsize + pwdsize + venvpromptsize > TERMWIDTH )); then
13+ if (( promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize > TERMWIDTH )); then
14 (( PR_PWDLEN = TERMWIDTH - promptsize ))
15 elif [[ "${langinfo[CODESET]}" = UTF-8 ]]; then
16- PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${PR_HBAR}:)}"
17+ PR_FILLBAR="\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize ) ))::${PR_HBAR}:)}"
18 else
19- PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}"
20+ PR_FILLBAR="${PR_SHIFT_IN}\${(l:$(( TERMWIDTH - (promptsize + rubypromptsize + pwdsize + venvpromptsize + condapromptsize ) ))::${altchar[q]:--}:)}${PR_SHIFT_OUT}"
21 fi
22 }
23
24@@ -104,7 +105,7 @@ fi
25 PROMPT='${PR_SET_CHARSET}${PR_STITLE}${(e)PR_TITLEBAR}\
26 ${PR_CYAN}${PR_ULCORNER}${PR_HBAR}${PR_GREY}(\
27 ${PR_GREEN}%${PR_PWDLEN}<...<%~%<<\
28-${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\
29+${PR_GREY})$(virtualenv_prompt_info)$(ruby_prompt_info)$(conda_prompt_info)${PR_CYAN}${PR_HBAR}${PR_HBAR}${(e)PR_FILLBAR}${PR_HBAR}${PR_GREY}(\
30 ${PR_CYAN}%(!.%SROOT%s.%n)${PR_GREY}@${PR_GREEN}%m:%l\
31 ${PR_GREY})${PR_CYAN}${PR_HBAR}${PR_URCORNER}\
32