Created
April 18, 2019 12:01
-
-
Save jazzytomato/b41dd10981caca44ac7211bea5c97fc1 to your computer and use it in GitHub Desktop.
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
# set a badge with a hostname | |
# Also sets a bg color when in prod | |
function warnssh() { | |
printf "\e]1337;SetBadgeFormat=%s\a" $(echo -n $1 | base64) | |
if [[ $1 =~ "^prod-.*" ]] ; then | |
echo -e "\033]1337;SetColors=bg=612c62\a" | |
fi | |
ssh $* | |
printf "\e]1337;SetBadgeFormat=%s\a" "" | |
echo -e "\033]1337;SetColors=bg=000\a" | |
} | |
alias ssh='warnssh' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment