Improve zsh prompt.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 13 Feb 2017 14:21:51 +0200
changeset 826 54d42c57cc4d
parent 825 b1536ac2ff88
child 827 4bd348e3422d
Improve zsh prompt.
.zshrc
--- a/.zshrc	Sun Feb 12 14:21:32 2017 +0200
+++ b/.zshrc	Mon Feb 13 14:21:51 2017 +0200
@@ -7,7 +7,14 @@
   . ~/.env
 fi
 
-PS1='zsh# '
+PS1=$'%?|%n@%m %~\nzsh# '
+PS2='> '
+case "$TERM" in
+  xterm*|eterm-color|screen|linux)
+    PS1=$'\n%F{cyan}%?|%F{red}%n%F{magenta}@%m %F{cyan}%~\n%F{red}%Bzsh#%b%f '
+    PS2=$'%F{green}> %f'
+  ;;
+esac
 
 HISTFILE=~/.zsh_history
 HISTSIZE=10000