Changing zstyle doesn't fix ESC/ctrl+c issue
Hmerac opened this issue · 2 comments
Hmerac commented
The tool works fine, although, when I'm in interactive mode and try to quit with ESC or ctrl+c, it pops out three more times before I can actually quit.
I changed the zstyle line in the path ~/.oh-my-zsh/lib/completion.zsh
here at line 3 to:
# case insensitive (all), partial-word and substring completion
if [[ "$CASE_SENSITIVE" = true ]]; then
zstyle ':completion:*' matcher-list 'r:|=*' #HERE
else
if [[ "$HYPHEN_INSENSITIVE" = true ]]; then
zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*'
else
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
fi
fi
unset CASE_SENSITIVE HYPHEN_INSENSITIVE
but that didn't change anything really. Am I configuring the wrong oh-my-zsh file?
Hmerac commented
Fixed it myself.
For other people who struggle with this, no need to think complex. Just added zstyle ':completion:*' matcher-list 'r:|=*'
to .zshrc and voila!
brouberol commented
Hi @Hmerac ! I stumbled onto the very same issue a while back, and @bonnefoa helped me figure it out. We came to exact same conclusion and documented the workaround in https://github.com/bonnefoa/kubectl-fzf#caveats