diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-05-03 15:04:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-05-03 15:04:19 +0200 |
commit | 84a28ac3754b6f132f6225af603557677b0ea799 (patch) | |
tree | 69233734f3be86902ceb2603dff19702b6dd7b62 /etc | |
parent | dfbaa0fd33627bfdc8945d25b2291ca074fdb9ed (diff) |
zshrc: show username in prompt if it's not "derf'
Diffstat (limited to 'etc')
-rw-r--r-- | etc/.zshrc | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -202,6 +202,7 @@ zle -N self-insert url-quote-magic typeset -A ps rps ps=( + user "%n" host "%F{yellow}%m" dir "%F{default}%30<…<%2v%>>" sign "%(!.%F{red}.%F{green})%(?.%(!.#.>).%?)%F{default}" @@ -213,7 +214,11 @@ rps=( end "%(1V.%F{yellow}]%F{default}.)" ) -PS1="${ps[host]} ${ps[dir]} ${ps[sign]} " +if [[ ${USER} == derf ]]; then + PS1="${ps[host]} ${ps[dir]} ${ps[sign]} " +else + PS1="${ps[user]}@${ps[host]} ${ps[dir]} ${ps[sign]} " +fi RPS1="${rps[start]}${rps[dirinfo]}${rps[end]}" |