Contents
What is shell integration in iTerm2?
iTerm2 may be integrated with the unix shell so that it can keep track of your command history, current working directory, host name, and more—even over ssh. This enables several useful features.
How do I know which shell?
- ps -p $$ – Display your current shell name reliably.
- echo “$SHELL” – Print the shell for the current user but not necessarily the shell that is running at the movement.
- echo $0 – Another reliable and simple method to get the current shell interpreter name on Linux or Unix-like systems.
Why does iTerm2 need to be integrated with the shell?
iTerm2 may be integrated with the unix shell so that it can keep track of your command history, current working directory, host name, and more—even over ssh. This enables several useful features. The easiest way to install shell integration is to select the iTerm2>Install Shell Integration menu item.
Is the iTerm2 integration script supported in tcsh?
This feature is not supported in tcsh. For zsh and bash users: if you are unable to modify PS1 directly (for example, if you use a zsh theme that wants to control PS1), you must take an extra step. Add export ITERM2_SQUELCH_MARK=1before the shell integration script is sourced.
What happens when you drop a file in iTerm2?
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. A new menu bar item will be added called Uploads that lets you view uploaded files and track their progress.
Where do I find the mark in iTerm2?
When shell integration is enabled, iTerm2 automatically adds a mark at each command prompt. Marks are indicated visually by a small blue triangle in the left margin. You can navigate marks with Cmd-Shift-Up and Down-arrow keys.