Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Never complete beyond ambiguous choices

I'm trying to figure out how to customize zsh completion so that it never completes beyond an ambiguous result by just hitting tab. Here's an example.

$ emacs f<TAB>
  food fool
(completes into)
$ emacs foo
  food fool

Importantly, if I press TAB after 'emacs foo' I would like zsh to beep instead of complete into the menu.

Thanks.

like image 494
Gregory Avatar asked Feb 24 '26 19:02

Gregory


1 Answers

Descending into the completion menu is controlled via the AUTO_MENU option. This is a default option which can be turned off by setting in your .zshrc the 'no' prefixed option.

setopt noautomenu

ZSH Documentation: 16 Options

like image 185
josephjohncox Avatar answered Mar 02 '26 12:03

josephjohncox



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!