From 49725d9a15700a6c2b4df0d4d83ad3caeaacec9e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 17 Oct 2008 20:33:55 +0200 Subject: Replace print_exit_value by exitcode in prompt --- etc/options | 3 --- etc/prompt | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/etc/options b/etc/options index bd31116..cbc5b7e 100644 --- a/etc/options +++ b/etc/options @@ -15,9 +15,6 @@ setopt correct # echo 'foo''bar''' will become foo'bar' setopt rc_quotes -# Alert me in case of non-zero exit status -setopt print_exit_value - # greedy is more like dvorak than qwerty... setopt dvorak diff --git a/etc/prompt b/etc/prompt index 5eba098..180a7c6 100644 --- a/etc/prompt +++ b/etc/prompt @@ -10,11 +10,13 @@ user="${ps_yellow}%n" at="@" host="${ps_yellow}%m" dir="${ps_reset}%30<…<%2v%>>" -sign="%(!.${ps_red}$(zchar prompt-root-ok).${ps_green}$(zchar prompt-user-ok))${ps_reset}" +(( EUID )) && ps_sign=$ps_green || ps_sign=$ps_red +sign="%(!.$(zchar prompt-root-ok).$(zchar prompt-user-ok))" +sign="${ps_sign}%(?.${sign}.%?)${ps_reset}" screen=$'%{\ek\e\\%}' PS1="${host} ${dir} ${sign} ${screen}" RPS1="${ps_yellow}[${ps_info}%1v${ps_yellow}%T]${ps_reset}" unset user at host -unset dir sign screen +unset dir ps_sign sign screen -- cgit v1.2.3