I created a function in my bashrc file so that when i ssh into something it automatically opens a tmux session.
function ssht () {
/usr/bin/ssh $@ -t 'tmux a || tmux || /bin/bash'
}
This works great, but i don't want to use ssht, i want to just use ssh. When i change the function from ssht to ssh tmux doesn't open but it does successfully ssh into the machine.
I assume it isn't working because when i call ssh it ignores the function in the bashrc file and instead runs ssh.
Is there some way i can just use "ssh" instead of "ssht"