zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

compinit vs zsh-autosuggestions

Open blueray453 opened this issue 4 years ago • 1 comments

My current .zshrc has compinit

autoload -Uz compinit
compinit

# zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
# zstyle ':completion:*' matcher-list '' 'm:{[:lower:]}={[:upper:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[sdsa]=* r:|=* l:|=*'
# zstyle :compinstall filename '/home/ismail/zshfiles/compinstall'

zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
eval "$(dircolors -b)"
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
zstyle ':completion:*' menu select=long
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true

zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'

# not just at the end
# py3[TAB] result in Python3
# cat /var/l[TAB]/syslog result in `/var/l[TSB]/syslog` 
setopt completeinword

I realized that even if I do not use run compinit the file ~/.zcompdump is there.

My question is, do I need these lines in my .zshrc if I use zsh-autosuggestions?

Does zsh-autosuggestions overlap with any feature of builtin zsh completion system?

blueray453 avatar Jul 16 '20 06:07 blueray453

I also have this question

CorvetteCole avatar Jul 12 '22 17:07 CorvetteCole

My question is, do I need these lines in my .zshrc if I use zsh-autosuggestions?

Yeah you will still need these. This plugin doesn't call compinit for you and you have to have called it yourself in order to use the completion strategy

ericfreese avatar Feb 17 '23 23:02 ericfreese