1
0
Fork 0

zsh: some functions and completion

This commit is contained in:
Von Random 2024-05-06 16:53:16 +03:00
parent 0d6a5e0b69
commit 220886b461
2 changed files with 6 additions and 1 deletions

View file

@ -31,6 +31,11 @@ typeset -A prompt_colors=(
bang '8'
)
prompt.set_bang() {
(( $# )) || return 1
prompt_symbols[bang]=$1
}
precmd.is_git_repo() {
typeset prompt_git_dir
prompt_git_dir=$(git rev-parse --git-dir 2>/dev/null) || return 1

View file

@ -34,7 +34,7 @@ zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' original true
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}'
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|=* r:|=*'
zstyle ':completion:*' rehash true
zstyle ':completion:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
zstyle ':completion:*:processes-names' command 'ps axho command'