I am trying to make bash completions work properly in zsh.
I am aware of the need to load these in ~/.zshrc:
autoload -Uz +X compinit && compinit
autoload -Uz +X bashcompinit && bashcompinitOne thing I observed, is that the compgen command behaves differently in zsh.
# In bash (as expected):
$ compgen -W "one two three" -- "t"
two
three
# In zsh ("one" is not expected to be listed)
$ compgen -W "one two three" -- "t"
one
two
threeDespite that, completions still work - but I am trying to understand why these are different, and perhaps if there is a different compgen syntax that returns the same results in both shells.
Reset to default