Add bold flag option to right prompt item colors

This commit is contained in:
Ilan Cosman 2020-04-28 15:43:22 -07:00
parent 8d562823fb
commit 3caf26473e
2 changed files with 11 additions and 6 deletions

View File

@ -14,11 +14,13 @@ end
function _lean_context
if set -q SSH_TTY
set -g lean_context_color $lean_context_ssh_color
set -g lean_context_color_bold false
set -l lean_context_output $USER'@'(prompt_hostname)
echo -n $lean_context_output
else if test $USER = "root"
set -g lean_context_color $lean_context_root_color
set -g lean_context_color_bold true
set -l lean_context_output $USER'@'(prompt_hostname)
echo -n $lean_context_output

View File

@ -1,13 +1,16 @@
function lean_right_prompt
echo -n " "
for item in lean_{$lean_right_prompt_items}
if test -n "$$item"
set -l colorName "$item"_color
set -l colorName "$item""_color"
set -l colorNameBoldFlag "$colorName""_bold"
if test $colorNameBoldFlag = "true"
set_color -o
end
set_color "$$colorName"
echo -n "$$item"
echo -n " "
echo -n "$$item"" "
set_color normal
end
end