diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2009-04-02 14:13:47 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2009-04-02 14:13:47 +0200 |
commit | 9de9888bd6ca64182d539a6c8a41229852c59d47 (patch) | |
tree | 42874abdd59958ccb2d43b9cc21230170a7f818b | |
parent | e5fc2e14b9d2a0ab0a944226b35c9b4cc5224681 (diff) |
[Prompts] bug with 'SEPARATOR' color
-rw-r--r-- | 12_Prompts.zsh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh index bbb5e11..ca27b84 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -46,8 +46,6 @@ set_prompt_colors # precmd : avant d'afficher le prompt # -SEPARATOR=$C_$prompt_colors[bar]$_C"-" - expand_text() { # strips the %{...%} @@ -101,7 +99,7 @@ set_prompt_date() { # Date [ "$DEBUG" = "yes" ] && echo -n " Date..." - DATE=$C_$prompt_colors[braces]$_C"[ "$C_$prompt_colors[date]$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" ]"$SEPARATOR + DATE=$C_$prompt_colors[braces]$_C"[ "$C_$prompt_colors[date]$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" ]"$C_$prompt_colors[bar]$_C"-" DATEEXPAND=$(expand_text "$DATE") DATESIZE=${#DATEEXPAND} [ "$DEBUG" = "yes" ] && echo @@ -113,7 +111,7 @@ update_prompt() error=$(print -Pn "%(?;;-%?)") ## MUST BE the first operation else we lose the error code... [ "$DEBUG" = "yes" ] && echo -n " Error code..." ERRORSIZE=${#error} - ERROR="%(?;;"$SEPARATOR$C_$prompt_colors[error]$_C"%?)" + ERROR="%(?;;"$C_$prompt_colors[bar]$_C"-"$C_$prompt_colors[error]$_C"%?)" [ "$DEBUG" = "yes" ] && echo [ "$DEBUG" = "yes" ] && echo -n " Term title..." @@ -170,7 +168,7 @@ update_prompt() AGENTS=$AGENTS$C_$agent_colors[$AGENTCOLOR]$_C"☆" fi fi - AGENTS=${AGENTS:+$SEPARATOR$AGENTS} + AGENTS=${AGENTS:+$C_$prompt_colors[bar]$_C"-"$AGENTS} AGENTSSIZE=$(expand_text $AGENTS) AGENTSSIZE=$#AGENTSSIZE |