Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

COMPLETE_IN_WORD does not work after first expand-or-complete



Hi,

I've observed the following unexpected behavior with COMPLETE_IN_WORD. Given the following setup:

% zsh -f
% autoload -U compinit && compinit
% setopt COMPLETE_IN_WORD
% zstyle ':completion:*' matcher-list '' 'r:|[._-]=* r:|=*' '+l:|=*'
% touch foo-bar-baz foo-baz

If I type the following and position the cursor where `|` is:

ls foo|-baz

and then type <TAB>, then I get the expected completion menu:

% ls foo-ba|z
foo-bar-baz  foo-baz

Then further pressing <TAB> navigates through the matches also as expected.

If I just type "ls z" and <TAB>, I then get to the same "ls foo|-bar" state as before, but pressing <TAB> again moves the cursor past the word immediatially, as if COMPLETE_IN_WORD were not in effect:

% ls foo-baz |

If, after typing "ls z" and <TAB>, I press <LEFT><RIGHT> just to "force" the position of the cursor, then further pressing <TAB> does again bring back the expected COMPLETE_IN_WORD behavior.

Is this a known issue or maybe am I missing some additional necessary configuration for COMPLETE_IN_WORD to work in all mentioned cases?

Thank you,
Eric


Messages sorted by: Reverse Date, Date, Thread, Author