diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2012-01-16 12:03:20 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2012-01-16 12:08:13 +0100 |
commit | 900ff698b84776ead3de557f73623c6550b154d6 (patch) | |
tree | 89b5d234e8f4557d3745932415a2303b240d55a8 /12_Prompts.zsh | |
parent | 9ee20990d95ef36145c446373dbe71f0ec8e9f13 (diff) |
[Prompt] esthétique
Diffstat (limited to '12_Prompts.zsh')
-rw-r--r-- | 12_Prompts.zsh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh index aff6d4d..f2f82a5 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -43,7 +43,7 @@ preexec () term_title "$(echo $1 | tr ' \n' ' ;' | sed 's/%/%%/g;s/\\/\\\\/g;s/;$//')" prompt_colors[date]=$date_colors[exec] - set_prompt_date + set_prompt_date "-" prompt_colors[date]=$date_colors[normal] spaceleft=$(($COLUMNS - $AGENTSSIZE - $STLINUXSIZE - $DATESIZE - $BATTERYSIZE)) @@ -67,9 +67,12 @@ preexec () set_prompt_date() { + begin=${${1:+j}:-k} + end=${${1:+m}:-l} + # Date [ "$DEBUG" = "yes" ] && echo -n " Date..." - DATE=$C_$prompt_colors[braces]$_C$T_"u"$_T" "$C_$prompt_colors[date]$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" "$C_$prompt_colors[bar]$_C$T_"tq"$_T + DATE=$C_$prompt_colors[braces]$_C$T_"${begin}"$_T" "$C_$prompt_colors[date]$_C"%D{%a-%d-%b-%Y %H:%M:%S}"$C_$prompt_colors[braces]$_C" "$C_$prompt_colors[bar]$_C$T_"${end}q"$_T DATEEXPAND=$(expand_text "$DATE") DATESIZE=${#DATEEXPAND} [ "$DEBUG" = "yes" ] && echo |