forked from mirrors_public/oddlama_nix-config
fix(zsh): remove weird tab completion on common prefixes
This commit is contained in:
parent
3c3429e2cb
commit
2eb46a736b
1 changed files with 5 additions and 49 deletions
|
@ -205,24 +205,15 @@ zstyle ':completion:*:git-checkout:*' sort false
|
||||||
zstyle ':completion:*:descriptions' format '[%d]'
|
zstyle ':completion:*:descriptions' format '[%d]'
|
||||||
# set list-colors to enable filename colorizing
|
# set list-colors to enable filename colorizing
|
||||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||||
|
# force zsh to show completion menu, so common prefixes are not expanded first
|
||||||
|
zstyle ':completion:*' menu yes
|
||||||
# preview directory's content when completing cd
|
# preview directory's content when completing cd
|
||||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls -lAhF --group-directories-first --show-control-chars --quoting-style=escape --color=always $realpath'
|
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls -lAhF --group-directories-first --show-control-chars --quoting-style=escape --color=always $realpath'
|
||||||
zstyle ':fzf-tab:complete:cd:*' popup-pad 20 0
|
zstyle ':fzf-tab:complete:cd:*' popup-pad 20 0
|
||||||
|
|
||||||
|
|
||||||
# No correction
|
|
||||||
zstyle ':completion:*' completer _oldlist _expand _complete _files _ignored
|
|
||||||
|
|
||||||
# Don't insert tabs when there is no completion (e.g. beginning of line)
|
# Don't insert tabs when there is no completion (e.g. beginning of line)
|
||||||
zstyle ':completion:*' insert-tab false
|
zstyle ':completion:*' insert-tab false
|
||||||
|
# start menu completion also if it could find unambiguous initial string
|
||||||
# allow one error for every three characters typed in approximate completer
|
zstyle ':completion:*' insert-unambiguous false
|
||||||
zstyle ':completion:*:approximate:' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )'
|
|
||||||
|
|
||||||
# start menu completion only if it could find no unambiguous initial string
|
|
||||||
zstyle ':completion:*:correct:*' insert-unambiguous true
|
|
||||||
zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}'
|
|
||||||
zstyle ':completion:*:correct:*' original true
|
|
||||||
|
|
||||||
# List directory completions first
|
# List directory completions first
|
||||||
zstyle ':completion:*' list-dirs-first true
|
zstyle ':completion:*' list-dirs-first true
|
||||||
|
@ -230,43 +221,8 @@ zstyle ':completion:*' list-dirs-first true
|
||||||
zstyle ':completion:*' original true
|
zstyle ':completion:*' original true
|
||||||
# Treat multiple slashes as a single / like UNIX does (instead of as /*/)
|
# Treat multiple slashes as a single / like UNIX does (instead of as /*/)
|
||||||
zstyle ':completion:*' squeeze-slashes true
|
zstyle ':completion:*' squeeze-slashes true
|
||||||
|
|
||||||
# insert all expansions for expand completer
|
|
||||||
# # ???????????????ßß
|
|
||||||
zstyle ':completion:*:expand:*' tag-order all-expansions
|
|
||||||
|
|
||||||
# match uppercase from lowercase
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
|
|
||||||
|
|
||||||
# separate matches into groups
|
|
||||||
zstyle ':completion:*:matches' group 'yes'
|
|
||||||
zstyle ':completion:*' group-name ''
|
|
||||||
|
|
||||||
zstyle ':completion:*:messages' format '%d'
|
|
||||||
zstyle ':completion:*:options' auto-description '%d'
|
|
||||||
|
|
||||||
# describe options in full
|
|
||||||
zstyle ':completion:*:options' description 'yes'
|
|
||||||
|
|
||||||
# on processes completion complete all user processes
|
|
||||||
zstyle ':completion:*:processes' command 'ps -au$USER'
|
|
||||||
|
|
||||||
# provide verbose completion information
|
# provide verbose completion information
|
||||||
zstyle ':completion:*' verbose true
|
zstyle ':completion:*' verbose true
|
||||||
|
|
||||||
# Ignore completion functions for commands you don't have:
|
|
||||||
zstyle ':completion::(^approximate*):*:functions' ignored-patterns '_*'
|
|
||||||
|
|
||||||
# Provide more processes in completion of programs like killall:
|
|
||||||
zstyle ':completion:*:processes-names' command 'ps c -u ${USER} -o command | uniq'
|
|
||||||
|
|
||||||
# complete manual by their section
|
|
||||||
zstyle ':completion:*:manuals' separate-sections true
|
|
||||||
zstyle ':completion:*:manuals.*' insert-sections true
|
|
||||||
zstyle ':completion:*:man:*' menu yes select
|
|
||||||
|
|
||||||
# provide .. as a completion
|
|
||||||
zstyle ':completion:*' special-dirs ..
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue