diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-10-17 20:33:55 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-10-17 20:33:55 +0200 |
commit | 49725d9a15700a6c2b4df0d4d83ad3caeaacec9e (patch) | |
tree | 78bfe3cbc3b8a485773cfb37d962df818c78cf0b | |
parent | 1eab285fbddf563f09f9060f89aaf2a52a1f2d8d (diff) |
Replace print_exit_value by exitcode in prompt
-rw-r--r-- | etc/options | 3 | ||||
-rw-r--r-- | 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 @@ -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 |