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.

Revisions

  1. clathrop created this gist Jun 26, 2015.
    18 changes: 18 additions & 0 deletions remote_env_profile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #################################################################################
    # 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"

    #################################################################################