zsh: Add stash display to pure prompt

Added stash being shown in git repositories (if there is a stash),
moved some initialization slightly.
This commit is contained in:
Marty Oehme 2021-08-25 20:47:07 +02:00
parent f08c8ebefd
commit 658e07e1b8
Signed by: Marty
GPG key ID: B7538B8F50A1C800

View file

@ -4,6 +4,9 @@
CONFDIR="${XDG_CONFIG_HOME:-$HOME/.config}"
ZSHCONFDIR="$CONFDIR/zsh"
# load completion, extended zsh moving syntax, zle edit in vim (or other $EDITOR) possibility
autoload -Uz compinit zmv edit-command-line promptinit
# Set completion style
# The following lines were added by compinstall
zstyle ':completion:*' completer _complete _ignored _approximate
@ -11,6 +14,7 @@ zstyle ':completion:*' matcher-list '' '+m:{[:lower:]}={[:upper:]} r:|[._-]=** r
zstyle ':completion:*' menu select=1
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle :compinstall filename "$ZSHCONFDIR/.zshrc"
compinit
# End of lines added by compinstall
# load plugins
@ -61,16 +65,13 @@ zstyle ':fzf-tab:complete:kill:argument-rest' extra-opts --preview=$extract'ps -
# give a preview of directory by exa when completing cd
zstyle ':fzf-tab:complete:cd:*' extra-opts --preview=$extract'exa -1 --color=always $realpath'
# load completion, extended zsh moving syntax, zle edit in vim (or other $EDITOR) possibility
autoload -Uz compinit zmv edit-command-line promptinit
compinit
# pure prompt init
promptinit
prompt pure
# make it single line
prompt_newline='%666v'
PROMPT=" $PROMPT"
# show git stash status as a ≡
zstyle :prompt:pure:git:stash show yes
prompt pure
# shellcheck source=alias
[ -f "$CONFDIR/sh/alias" ] && source "$CONFDIR/sh/alias"