Skip to content

Instantly share code, notes, and snippets.

@clathrop
Created June 26, 2015 21:06
Show Gist options
  • Save clathrop/f60e85853294c64507b4 to your computer and use it in GitHub Desktop.
Save clathrop/f60e85853294c64507b4 to your computer and use it in GitHub Desktop.
my default remote bash_profile script
#################################################################################
# Add personal setup here.
# give a nickname to this machine for reference purposes on cli
export HOSTNICK="rd35"
parse_git_branch() {
git branch 2>/dev/null | grep \* | sed -ne 's#\* ##p' | awk -F / '{print " [GIT:"$0 "]"}'
}
echo_host() {
echo $HOSTNICK
}
export PS1='$(echo_host): \[\033[00;32m\]\w\[\033[00m\]$(parse_git_branch)\$ '
echo "welcome back, Carter"
#################################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment