How can I disable the feature in oh-my-zsh where pressing tab triggers ls (list directory)?
Similarly, when typing certain characters like c or g and then hitting tab, I’m also getting zsh: do you wish to see all X possibilities (Y lines)?
For the other characters it just prints them without asking.
This is triggered every time I press tab. Weirdly, I can’t even use it. Pressing tab or arrow down a second time does not go through the list of files/folders.
It is extremely annoying because it interferes with the zsh-autosuggestions
plugin.
What I’ve tried
I tried various things including:
- adding
unsetopt AUTO_CD autocd AUTO_MENU MENU_COMPLETE CDABLE_VARS AUTO_NAME_DIRS
to my.zshrc
. None worked. - re-installing oh-my-zsh completely (because I thought it was triggered by the zsh-autocomplete plugin)
I first thought this was due to the zsh-autocomplete plugin I installed, but I have long uninstalled all remnants of this plugin.
Other links
- found a related question here on Stack Overflow where someone wanted to limit this list to directories (and exclude files)
- posted an issue about this on the ohmyzsh GitHub repo
- related ohmyzsh GitHub issue discussing settings of the zsh-autocomplete plugin
- this Stack Overflow user had a similar issue but just wanted to change the shortcut of the autocomplete. (This educated me that I can press arrow right to accept zsh-autosuggestions)