summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-05-03 15:04:19 +0200
committerDaniel Friesel <derf@finalrewind.org>2014-05-03 15:04:19 +0200
commit84a28ac3754b6f132f6225af603557677b0ea799 (patch)
tree69233734f3be86902ceb2603dff19702b6dd7b62 /etc
parentdfbaa0fd33627bfdc8945d25b2291ca074fdb9ed (diff)
zshrc: show username in prompt if it's not "derf'
Diffstat (limited to 'etc')
-rw-r--r--etc/.zshrc7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/.zshrc b/etc/.zshrc
index 899e6c0..a3a0c9d 100644
--- a/etc/.zshrc
+++ b/etc/.zshrc
@@ -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]}"