I'm in a folder where I have the following files:
aaa1 aaa2 aaa3 bbb1 bbb2 bbc1 bbc2
and I have typed cd a
at the prompt. Currently,
- pressing Tab completes to
cd aaa
- then another Tab brings up the menu (
aaa1/ aaa2/ aaa3/
) - and finally a third Tab completes to
cd aaa1/
- and subsequent presses cycle through the menu
I'd like to combine the first and second Tab, so that:
- pressing Tab completes to
cd aaa
and brings up the menu - pressing another Tab completes to
cd aaa1/
- subsequent presses cycle through the menu as usual
OR
- pressing Tab completes to
cd aaa
- pressing another Tab brings up the menu and completes to
cd aaa1/
- subsequent presses cycle through the menu as usual
Is there any combination of (un)setopt
or zstyle
that can achieve this?
Best Answer
Hmm, this method appears to get directly to selecting "aaa1" and being in a loop-on-the-menu-items mode:
As does the
menucomplete
option:There is an
autolist
option, but that only lists the options with input ofcd aaa
but not your desiredcd a
case. Hmm! How about this:This completes to
cd aaa
and shows the "aaa*" directories.