Skip to content

Instantly share code, notes, and snippets.

@mwerner
Last active December 25, 2015 13:19
Show Gist options
  • Save mwerner/6983246 to your computer and use it in GitHub Desktop.
Save mwerner/6983246 to your computer and use it in GitHub Desktop.
Make your prompt remind you you're currently in an ssh session
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