summaryrefslogtreecommitdiff
path: root/11_Colors.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2012-06-05 15:08:24 +0200
committerHugues Hiegel <hugues@hiegel.fr>2012-06-05 15:08:24 +0200
commit4782cea0cc326f636943316f04fcb5444cd8c609 (patch)
tree2808a651c48481c056fcdb0c94cbaa3e3414a470 /11_Colors.zsh
parent1069fe924db7626dc6f9bc995250a3da55e8c52e (diff)
[Prompts] sc (set colors) for prompt
Diffstat (limited to '11_Colors.zsh')
-rw-r--r--11_Colors.zsh12
1 files changed, 11 insertions, 1 deletions
diff --git a/11_Colors.zsh b/11_Colors.zsh
index d38ee68..8edf6b0 100644
--- a/11_Colors.zsh
+++ b/11_Colors.zsh
@@ -16,7 +16,17 @@ _correct_colors[suggest]="$color[blue];$color[bold]"
# This func is intended to give a quick way to reset the colors
# from a running zsh-session
#
-set_prompt_colors ()
+sc ()
+{
+ C=""
+ for c in $( echo $@ | tr ';' ' ' )
+ do
+ c=${$(echo "$c" | sed 's/^[0-9]$/0\0/;/^[0-9]\{2\}$/!d'):-$color[$c]}
+ C+=${C:+;}${c:-00}
+ done
+ __set_prompt_colors $C
+}
+__set_prompt_colors ()
{
# Forces HBAR re-generation with new colors..
_COLUMNS_OLD=0