Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable autocomplete in iTerm2

Let's say I'm in my root directory, and I have a User folder that I can cd into. In my default Mac terminal, I can just type cd U + tab, and it autocompletes to cd Users/. How do I get this to work in iTerm2?

It used to work just fine in iTerm2, but I must have changed a setting somewhere that disabled it, and I cannot figure out how to get it back.

like image 900
Farid Avatar asked Jul 02 '17 01:07

Farid


People also ask

How do I enable command history in iTerm2?

Commands in command history are also added to Autocomplete (Cmd-;). If Preferences>General>Save copy/paste history and command history to disk is enabled, then command history will be preserved across runs of iTerm2 (up to 200 commands per user/hostname). A command history tool may be added to the toolbelt by selecting Toolbelt>Command History.

How to remap modifiers in iTerm2?

iTerm2 allows you to remap modifiers. You have separate control over left and right command and option keys. One common need is to exchange cmd and option. To do this, go to Preferences > Keys. Set Left option key to Left command key and Left command key to Left option key (and do the same for Right command and Right option if you please).

How do I enable shell integration in iTerm2?

How To Enable Shell Integration. The easiest way to install shell integration is to select the iTerm2>Install Shell Integration menu item. It will download and run a shell script as described below. You should do this on every host you ssh to as well as your local machine.

What's new in iTerm2?

A new menu bar item will be added called Downloads that lets you view downloaded files and track their progress. If you drop a file (e.g., from Finder) into iTerm2 while holding the option key, iTerm2 will offer to upload the file via scp to the remote host into the directory you were in on the line you dropped the file on.


2 Answers

Autocomplete in iTerm2 activates by pressing cmd + ;

like image 82
leealex Avatar answered Sep 21 '22 15:09

leealex


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

  • Install bash-completion with brew
like image 23
Shersh Avatar answered Sep 21 '22 15:09

Shersh