How to enable autocomplete in iTerm2

You can install bash-completion package to autocomplete by Tab key.

  • Install bash-completion with brew

Steps to add a keybinding for the TAB key:

  1. CMD + , to enter preferences
  2. open tab Keys
  3. in bottom left: add a Key Binding by clicking on the "+" button
  4. click on area to record key
  5. hit TAB key to record it

Then in column Action click on "Select Menu Item" and then on the next drop down select "Ppen Autocomplete" under the session section.

I changed it using these settings:

screenshot


Autocomplete in iTerm2 activates by pressing cmd + ;