-
-
Save jandahl/5540164 to your computer and use it in GitHub Desktop.
Update screen/byobu window title based on hostname you want to ssh to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Remember to check your $TERM and fix the conditional below | |
if [ $TERM == "screen-bce" ] ; then | |
trap 'echo -n -e "\033k${HOSTNAME}\033\\"' 0 1 2 15 | |
echo -n -e "\033k$1\033\\" | |
fi | |
/usr/bin/ssh $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment