For reference, and as I'm not completely sure, how bash
behaves exactly, I quote from the A User's Guide to the Z-Shell by Peter Stephenson, the current maintainer of zsh
.
6.2.1 Ambiguous completions
The largest group of options deals with what happens when a completion
is ambiguous, in other words there is more than one possible
completion. The seven relevant options are as follows, as copied from
the FAQ; many different combinations are possible:
- with NO_BEEP set, that annoying beep goes away,
- with NO_LIST_BEEP, beeping is only turned off for ambiguous completions,
- with AUTO_LIST set, when the completion is ambiguous you get a list without having to type
CTRL+D
,
- with BASH_AUTO_LIST set, the list only happens the second time you hit tab on an ambiguous completion,
- with LIST_AMBIGUOUS, this is modified so that nothing is listed if there is an unambiguous prefix or suffix to be inserted -- this can
be combined with BASH_AUTO_LIST, so that where both are applicable
you need to hit tab three times for a listing,
- with REC_EXACT, if the string on the command line exactly matches one of the possible completions, it is accepted, even if there is
another completion (i.e. that string with something else added) that
also matches,
- with MENU_COMPLETE set, one completion is always inserted completely, then when you hit
TAB
it changes to the next, and so on
until you get back to where you started,
- with AUTO_MENU, you only get the menu behaviour when you hit TAB again on the ambiguous completion.
You probably want to use (but as I'm said I'm not sure, please feel free to correct me)
setopt BEEP NO_AUTOLIST BASH_AUTOLIST NO_MENUCOMPLETE
where setopt NO_OPTION
is equivalent to unset OPTION
.