Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set tmux pane title to short hostname on ssh connections for Fish
# Copy that into your ~/.config/fish/
function ssh
set ps_res (ps -p (ps -p %self -o ppid= | xargs) -o comm=)
if [ "$ps_res" = "tmux" ]
tmux rename-window (echo $argv | cut -d . -f 1)
command ssh "$argv"
tmux set-window-option automatic-rename "on" 1>/dev/null
command ssh "$argv"

This comment has been minimized.

Copy link
Owner Author

thomascharbonnel commented Nov 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.