From d81387638bc304c0a91e30b6cb8eb524efc9bf2d Mon Sep 17 00:00:00 2001 From: shmibs Date: Tue, 11 Aug 2015 07:54:54 -0700 Subject: multi-line prompt with extra context --- .zshrc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3