Using bash I did like to do something like this:
$ l
file15165
file23132
file31351
xyzfile
$ $CMD f<TAB>
(f gets completed to "file", I type "*", [23] or whatever)
$ $CMD file*<Enter>
This way I am sure the command is executed on all the files I want it to.
When I try to do this with zsh, this happens:
$ l
file15165
file23132
file31351
xyzfile
$ $CMD f<TAB>
(f is completed to "file15165", I have to press <backspace> five times and then type "*")
$ $CMD file*<Enter>
Which is quite ineffective. Now how can I achieve the bash behaviour using zsh? Or how would a zsh user attempt to do what I am doing?
It appears I had setopt menucomplete
in my .zshrc, which resulted in the explained behaviour. Removing it fixed it.