aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_git_prompt.fish
diff options
context:
space:
mode:
authorGravatar Mariusz Smykuła <mariuszs@gmail.com>2013-06-18 22:20:28 +0200
committerGravatar Mariusz Smykuła <mariuszs@gmail.com>2013-06-18 22:20:28 +0200
commita142c5e1ec99278b9ca235bbd71adf693be62373 (patch)
treec4ce4aa09fda32c83a6c99e6bab961c73fbc8b43 /share/functions/__fish_git_prompt.fish
parent47022832800f1b224fe6119a1a793aafaa2a8b46 (diff)
Support for defining color with bold/brighter color set
Diffstat (limited to 'share/functions/__fish_git_prompt.fish')
-rw-r--r--share/functions/__fish_git_prompt.fish15
1 files changed, 13 insertions, 2 deletions
diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish
index bef8753c..1b0b187a 100644
--- a/share/functions/__fish_git_prompt.fish
+++ b/share/functions/__fish_git_prompt.fish
@@ -493,13 +493,24 @@ end
function __fish_git_prompt_set_color
set -l user_variable_name "$argv[1]"
+ set -l user_variable $$user_variable_name
+ set -l user_variable_bright
+
+ if test (count $user_variable) -eq 2
+ set user_variable_bright $user_variable[2]
+ set user_variable $user_variable[1]
+ end
+
set -l variable _$user_variable_name
set -l variable_done "$variable"_done
- set -l user_variable $$user_variable_name
if not set -q $variable
if test -n "$user_variable"
- set -g $variable (set_color $user_variable)
+ if test -n "$user_variable_bright"
+ set -g $variable (set_color -o $user_variable)
+ else
+ set -g $variable (set_color $user_variable)
+ end
set -g $variable_done (set_color normal)
else
set -g $variable ''