From a3e155fa2d0038cc5f7d62c878094307321b9a51 Mon Sep 17 00:00:00 2001 From: Daniel Holman Date: Mon, 24 Jul 2017 03:11:52 -0500 Subject: Added some prompt options in .zshrc Added 5 lines of shell code to .zshrc in order to make working with git repositories more productive --- .zshrc | 9 +++++++-- 1 file 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 \ -- cgit v1.2.3