aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshmibs <shmibs@gmail.com>2015-08-11 07:54:54 -0700
committershmibs <shmibs@gmail.com>2015-08-11 07:54:54 -0700
commitd81387638bc304c0a91e30b6cb8eb524efc9bf2d (patch)
treea950eea9e82d8b3ed58f3ad0862060460d89c789
parent74495ab4c2aff7dc618b021990ce098dafbd22ad (diff)
downloaddotfiles-d81387638bc304c0a91e30b6cb8eb524efc9bf2d.tar.gz
multi-line prompt with extra context
-rw-r--r--.zshrc16
1 files changed, 15 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index 001ba83..86280b1 100644
--- a/.zshrc
+++ b/.zshrc
@@ -20,7 +20,21 @@ bindkey -e
setopt notify
unsetopt beep
-PROMPT="%{%B$fg[white]%}[%{%(!.$fg[red].$fg[magenta])%}%n@%M %{$fg[blue]%}%c%{$fg[white]%}]: %{%b$reset_color%}"
+#################### PROMPT ###################
+PROMPT="%{%B$fg[white]%}┌["
+# if non-zero, previous return val
+PROMPT+="%(0?..$fg[red]%?$fg[white]:)"
+# if any, number of jobs
+PROMPT+="%(1j.$fg[green]%j$fg[white]:.)"
+# name and host (red for root)
+PROMPT+="%{%(!.$fg[red].$fg[magenta])%}%n@%M%E "
+# current location, with one level of parent context
+PROMPT+="%{$fg[blue]%}%2c"
+# newline
+PROMPT+="%{$fg[white]%}]%{%b$reset_color%}
+"
+PROMPT+="%{%B$fg[white]%}└: %{%b$reset_color%}"
+
################# HIGHLIGHTING ################
if [[ -f '/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ]]; then