summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Holman <dholman@gymli.org>2017-07-24 03:11:52 -0500
committerDaniel Holman <dholman@gymli.org>2017-07-24 03:11:52 -0500
commita3e155fa2d0038cc5f7d62c878094307321b9a51 (patch)
treec2b7553e294dcf6742170a5af712ea801bb9c81e
parentcb16f8729c15f1790ba778cdc21379bccd47d2fa (diff)
Added some prompt options in .zshrc
Added 5 lines of shell code to .zshrc in order to make working with git repositories more productive
-rw-r--r--.zshrc9
1 files changed, 7 insertions, 2 deletions
diff --git a/.zshrc b/.zshrc
index 8a8a642..349c73a 100644
--- a/.zshrc
+++ b/.zshrc
@@ -13,8 +13,6 @@ autoload -Uz compinit
compinit
# End of lines added by compinstall
-PROMPT="$ "
-
# Additional completion options
zstyle ':completion:*' use-cache on
zstyle ':completion:*:cd:*' ignore-parents parent pwd
@@ -26,6 +24,7 @@ zstyle ':completion:*:kill:*' force-list always
zstyle ':completion:*' squeeze-slashes true
source /usr/share/doc/pkgfile/command-not-found.zsh
+source /usr/share/git/completion/git-prompt.sh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
@@ -46,6 +45,12 @@ export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
export GPGKEY=90D8F8E2C830F6129B2FBB1133836B30AA014B82
export GPG_TTY=$(tty)
+setopt PROMPT_SUBST
+GIT_PS1_SHOWUPSTREAM=auto
+GIT_PS1_SHOWDIRTYSTATE=1
+GIT_PS1_SHOWUNTRACKEDFILES=1
+PS1='$(__git_ps1 "(%s)")\$ '
+
# Make shell stuff behave nicely
man() {
env \