1

I want to set up a custom profile in iTerm2 that connects directly to a remote machine in tmux, with some custom SSH arguments. I have a fish function that does this, called "ss". When I have this session open, I want the tab/window name to always be the name of the session. iTerm appears to have this option, reading "If showing profile name in tab title, keep it when the title is changed", but it doesn't ever set the tab title to the profile name.

I've attempted to do this myself by setting the command differently.

Try 1: /usr/local/bin/fish -c "function fish_title; echo ec2main; end; ss ec2main" Try 2: /usr/local/bin/fish -c "echo -ne \033]0;ec2main\007; ss ec2main"

Neither of these works, the tab title is always simply "fish".

Anyone know how I can accomplish this?

1 Answer 1

2

Please make sure that in Preferences -> Appearance -> "Windows & Tab titles" you have CHECKED the option "Show profile name". Then create a profile for every connection that you need.

(re)connect and the title should become "profile_name: terminal_title". You will still be able to change the last part with commands like echo -ne "\033]0;ec2main\007"

1
  • 1
    Thank you! I suppose the combination of "Show Profile Name" and "keep it when title is changed" is necessary, because this did not affect my other profiles with that option disabled (which was desired). Mar 14, 2014 at 17:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .