zsh: some functions and completion
This commit is contained in:
parent
0d6a5e0b69
commit
220886b461
2 changed files with 6 additions and 1 deletions
|
@ -31,6 +31,11 @@ typeset -A prompt_colors=(
|
||||||
bang '8'
|
bang '8'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
prompt.set_bang() {
|
||||||
|
(( $# )) || return 1
|
||||||
|
prompt_symbols[bang]=$1
|
||||||
|
}
|
||||||
|
|
||||||
precmd.is_git_repo() {
|
precmd.is_git_repo() {
|
||||||
typeset prompt_git_dir
|
typeset prompt_git_dir
|
||||||
prompt_git_dir=$(git rev-parse --git-dir 2>/dev/null) || return 1
|
prompt_git_dir=$(git rev-parse --git-dir 2>/dev/null) || return 1
|
||||||
|
|
|
@ -34,7 +34,7 @@ zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character
|
||||||
zstyle ':completion:*' list-suffixes true
|
zstyle ':completion:*' list-suffixes true
|
||||||
zstyle ':completion:*' original true
|
zstyle ':completion:*' original true
|
||||||
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
|
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:*' rehash true
|
||||||
zstyle ':completion:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
|
zstyle ':completion:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
|
||||||
zstyle ':completion:*:processes-names' command 'ps axho command'
|
zstyle ':completion:*:processes-names' command 'ps axho command'
|
||||||
|
|
Loading…
Reference in a new issue