How to Enable Autocomplete in Mac Terminal

Usually in a Unix/Linux terminal when you press tab it will autocomplete with several options and then it will list the options below for you to select. This is a great feature if you spend a lot of time in the terminal. You could install ZSH to get these features or if you are like me and like to keep things simple, you can enable autocomplete in the mac terminal using bash.

Enable auto-complete in Mac Os terminal

  1. Type in terminal nano ~/.inputrc
  2. Paste the following on separate lines
  3. set completion-ignore-case on
    set show-all-if-ambiguous on
    TAB: menu-complete
  4. Hit control+O to save changes to .inputrc followed by control+X to exit nano
  5. Open a new Terminal window or tab to open a new session with autocomplete enabled
  6. Type and hit the tab key

Let me know if this is helpful in the comments below!


Also published on Medium.

17 thoughts to “How to Enable Autocomplete in Mac Terminal”

  1. .inputrc is a bash thing, it has nothing to do with the Mac Terminal as the headline says.

    If you’re not using bash, this won’t help.
    If you are using bash and using iterm2 or some other terminal program or ssh’ing, it will.

    1. Good point but isn’t bash default for Mac OS? I’m assuming that if you are not using bash, you would know this Wil not work. Thanks for the feedback. I will update the post 👍

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.