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.
/usr/local/bin/fish -c "function fish_title; echo ec2main; end; ss ec2main"
/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?