Here is what zsh-autocomplete displays regarding these files:
If I hit TAB, the "common substring" shown above is autocompleted for me:
❯ ls foo_.sh
Note that the autocompleted text includes both the common prefix foo_ and the common suffix .sh.
But this isn't useful. There is no file called foo_.sh, so after this text is autocompleted, I have to reason about which characters are now missing, move my cursor back to that position, and type them all in. And if that file isn't the end of my command, then I have to move the cursor back to the end to continue the command.
So the current "common substring" autocompletion entails lots of unnecessary cursor movement. Much better would be to complete only the common prefixfoo_, then let me add another character to narrow down what I want, then press tab to complete to the end.
Is this prefix + suffix completion behavior a bug in the plugin? Or is it something that I can configure? The docs didn't provide the answer for this.
Consider the following directory:
Here is what
zsh-autocomplete
displays regarding these files:If I hit
TAB
, the "common substring" shown above is autocompleted for me:Note that the autocompleted text includes both the common prefix
foo_
and the common suffix.sh
.But this isn't useful. There is no file called
foo_.sh
, so after this text is autocompleted, I have to reason about which characters are now missing, move my cursor back to that position, and type them all in. And if that file isn't the end of my command, then I have to move the cursor back to the end to continue the command.So the current "common substring" autocompletion entails lots of unnecessary cursor movement. Much better would be to complete only the common prefix
foo_
, then let me add another character to narrow down what I want, then press tab to complete to the end.Is this prefix + suffix completion behavior a bug in the plugin? Or is it something that I can configure? The docs didn't provide the answer for this.