1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 14:50:40 +02:00

fix(zsh): remove weird tab completion on common prefixes

This commit is contained in:
oddlama 2024-06-24 12:42:53 +02:00
parent 3c3429e2cb
commit 2eb46a736b
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -205,24 +205,15 @@ zstyle ':completion:*:git-checkout:*' sort false
zstyle ':completion:*:descriptions' format '[%d]'
# set list-colors to enable filename colorizing
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
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
# No correction
zstyle ':completion:*' completer _oldlist _expand _complete _files _ignored
# Don't insert tabs when there is no completion (e.g. beginning of line)
zstyle ':completion:*' insert-tab false
# allow one error for every three characters typed in approximate completer
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
# start menu completion also if it could find unambiguous initial string
zstyle ':completion:*' insert-unambiguous false
# List directory completions first
zstyle ':completion:*' list-dirs-first true
@ -230,43 +221,8 @@ zstyle ':completion:*' list-dirs-first true
zstyle ':completion:*' original true
# Treat multiple slashes as a single / like UNIX does (instead of as /*/)
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
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 ..
zstyle ':completion:*' verbose true
# --------------------------------------------------------------------------------