0

I'm trying to switch to iterm from terminal. I install latest iTerm2 (3.1.5), select iTerm2 in the top left hand corner, and click 'Install Shell Integration'. Basically, I followed these instructions here.

Next, I create a profile for my ssh called 'foo' and drop the command in the ~/.bash_profile with the following line.

alias foo='set_iterm_profile foo; ssh [email protected]'

I exit the shell and open a fresh one. And type

$ foo

Immediately, I get a response.

-bash: set_iterm_profile: command not found

Something must have gone wrong with the integration. So, I check my ~/.bash_profile and see

test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"

Cool. Looks good to me. Does the file even exist?

ll ${HOME}/.iterm2_shell_integration.bash
/Users/me/.iterm2_shell_integration.bash

Yes it does! I close the shell and try again. I even install a different version. Same result.

Why can't I get iterm's shell integration integrated?

System: macOS High Sierra 10.13.1

1 Answer 1

0
set_iterm_profile() { echo -e "\033]50;SetProfile=$1\a"; }

For whatever reason I believed this command to be related to iTerm, but it's actually a bash function that needed to be set. The link that save my life....

https://coderwall.com/p/s-2_nw/change-iterm2-color-profile-from-the-cli

You must log in to answer this question.