aboutsummaryrefslogtreecommitdiff
path: root/zshrc.d/prompt
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-26 15:02:07 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-26 15:26:36 +0100
commit47d3b6fc1966df43b37751165d6fa4229904c0fa (patch)
treecccb190aad69ed1afb93654922575a95e7745d03 /zshrc.d/prompt
downloadshellrc-47d3b6fc1966df43b37751165d6fa4229904c0fa.tar.gz
shellrc-47d3b6fc1966df43b37751165d6fa4229904c0fa.tar.bz2
shellrc-47d3b6fc1966df43b37751165d6fa4229904c0fa.zip
Initial commitv0.1
Diffstat (limited to 'zshrc.d/prompt')
-rw-r--r--zshrc.d/prompt17
1 files changed, 17 insertions, 0 deletions
diff --git a/zshrc.d/prompt b/zshrc.d/prompt
new file mode 100644
index 0000000..07437b1
--- /dev/null
+++ b/zshrc.d/prompt
@@ -0,0 +1,17 @@
+# vim: ft=zsh
+
+[ $UID -eq 0 ] && NCOLOR="red" || NCOLOR="green"
+PROMPT="%(?..%{$fg_bold[yellow]%}EXIT: %?
+)%{$fg_bold[$NCOLOR]%}%n@%m:%{$fg_bold[blue]%}%1~%{$fg_bold[$NCOLOR]%}%(!.#.$)%{$reset_color%} "
+unset NCOLOR
+
+if [ -e ~/.local/git-prompt.sh ]; then
+ source ~/.local/git-prompt.sh
+ export GIT_PS1_SHOWDIRTYSTATE=y
+ export GIT_PS1_SHOWUNTRACKEDFILES=y
+ export GIT_PS1_SHOWUPSTREAM="auto"
+ export GIT_PS1_STATESEPARATOR=""
+ export GIT_PS1_SHOWUPSTREAM=y
+ export GIT_PS1_DESCRIBE_STYLE="branch"
+ RPROMPT='$(__git_ps1 "%s")'
+fi