Last active
December 25, 2015 13:19
-
-
Save mwerner/6983246 to your computer and use it in GitHub Desktop.
Make your prompt remind you you're currently in an ssh session
This file contains 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
current_machine(){ | |
if [[ $(echo $SSH_CONNECTION 2>/dev/null | tail -n 1) != '' ]]; then | |
echo "%{$fg_bold[yellow]%}($(hostname))%{$reset_color%} " | |
fi | |
} | |
export PROMPT=$'$(current_machine)$(pwd)› ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment