hlissner / zsh-autopair

Auto-close and delete matching delimiters in zsh
MIT License
509 stars 37 forks source link

Text following cursor Interferes with autocompletion #3

Open hlissner opened 8 years ago

hlissner commented 8 years ago

Assuming | is the cursor position:

echo $AUTOPAIR_PAIRS[|] => Tab

Expected

Hash completion

Actual

Trailing ] interferes with completion and no completion is done.

Workaround

This allows completion to work regardless of what's in front of the cursor:

bindkey '^I' expand-or-complete-prefix

I want a better solution though. Perhaps a combination of setopt COMPLETE_IN_WORD and _prefix completion...?

IngoMeyer441 commented 6 years ago

Does the workaround still work? I tried it for

echo ${|}

to complete environment variables but it does not seem to work on zsh 5.5.1.