Bash wildcard completion

bashcommand linezsh

Is it possible to make bash expand wildcards on tab completion in the same style as zsh?

So imagine the following:

mkdir new
touch new/1.txt new/2.txt new/3.log

Now,

ls new/*.txt<TAB>

Would expand to

ls new/1.txt new/2.txt new/3.log

BUT ls new/ should not expand but should instead list potential matches (no wildcard).

M-* gets close but isn't quite there. If you try the above in zsh you will see the desired behaviour.

Best Answer

I think you looking for C-x * (glob-expand-word). I've never used zsh, but see if that does what you are looking for.

Related Question