4

I am on OSX Sierra 10.12.6 and I am experiencing odd behavior in terminal windows.

When entering a command like cd ~/, I expect to press Tab twice quickly to see all path options. For example:

cd ~/

[double press tab]

cd ~/
.CFUserTextEncoding
.DS_Store
.Trash/
.account
.android/
.avn/
.avnrc
.babel.json
.bash_history
.bash_profile
...

Instead, I only see one path option at a time. Pressing Tab simply cycles to the next one:

cd ~/
[press tab]
cd ~/.CFUserTextEncoding
[press tab]
cd ~/.DS_Store
[press tab]
cd ~/.Trash/
...etc

Pressing Tab twice quickly simply does this twice.

This issue has remained constant through multiple OS updates. Does anybody know how to fix it?

  • Great question. – Rob Sep 17 '17 at 14:21
4

It sounds like you have menu-complete, not complete, bound to the tab key. (Confirm with bind -P | grep menu-complete.) There are several ways this could have been activated:

  • C-i: menu-complete in your .inputrc file
  • bind 'C-i: menu-complete' in .bashrc or some other shell configuration file.

If you can find the offending line, remove it to restore the default binding to complete. If you can't, try adding C-i: complete to your .inputrc file to override the binding to menu-complete.

  • 1
    Amazing! This has been driving me insane for months. Thank you! – Bogdan Balan Sep 11 '17 at 19:34
  • Followed by a Great Answer. – Rob Sep 17 '17 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.