mirror of
https://github.com/IlanCosman/tide.git
synced 2024-09-17 20:17:43 +03:00
Add bold flag option to right prompt item colors
This commit is contained in:
parent
8d562823fb
commit
3caf26473e
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user