Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gengwg/71c1fe8cd9bb91752d87cd4cb7bd8656 to your computer and use it in GitHub Desktop.
Save gengwg/71c1fe8cd9bb91752d87cd4cb7bd8656 to your computer and use it in GitHub Desktop.
iTerm2 shell integration
gengwg@gengwg-mbp:~$ curl -L https://iterm2.com/shell_integration/install_shell_integration_and_utilities.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5255 100 5255 0 0 27971 0 --:--:-- --:--:-- --:--:-- 28715
Downloading script from https://iterm2.com/shell_integration/zsh and saving it to /Users/gengwg/.iterm2_shell_integration.zsh...
Checking if /Users/gengwg/.zshrc contains iterm2_shell_integration...
Appending source command to /Users/gengwg/.zshrc...
Downloading imgcat...
Downloading imgls...
Downloading it2api...
Downloading it2attention...
Downloading it2check...
Downloading it2copy...
Downloading it2dl...
Downloading it2getvar...
Downloading it2git...
Downloading it2setcolor...
Downloading it2setkeylabel...
Downloading it2tip...
Downloading it2ul...
Downloading it2universion...
Downloading it2profile...
Adding aliases...
--------------------------------------------------------------------------------
Done.
iTerm2 shell integration was installed!
A script was installed to /Users/gengwg/.iterm2_shell_integration.zsh
Utilities were installed to /Users/gengwg/.iterm2. You don't need to modify your PATH because /Users/gengwg/.iterm2_shell_integration.zsh includes aliases for them.
To make it work right now, do:
source /Users/gengwg/.iterm2_shell_integration.zsh
This line was also added to /Users/gengwg/.zshrc, so the next time you log in it will be loaded automatically.
--------------------------------------------------------------------------------
You will also have these commands:
imgcat filename
Displays the image inline.
imgls
Shows a directory listing with image thumbnails.
it2api
Command-line utility to manipulate iTerm2.
it2attention start|stop|fireworks
Gets your attention.
it2check
Checks if the terminal is iTerm2.
it2copy [filename]
Copies to the pasteboard.
it2dl filename
Downloads the specified file, saving it in your Downloads folder.
it2setcolor ...
Changes individual color settings or loads a color preset.
it2setkeylabel ...
Changes Touch Bar function key labels.
it2tip
iTerm2 usage tips
it2ul
Uploads a file.
it2universion
Sets the current unicode version.
it2profile
Change iTerm2 session profile on the fly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment