Created
July 7, 2019 23:33
-
-
Save juliantrueflynn/434ecf880496357f4fa4b256d035c089 to your computer and use it in GitHub Desktop.
Bash scripts I use for Macbooks
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
# Get current git branch name | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# Format Terminal input prefix | |
export PS1="\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
# Load RVM into a shell session *as a function* | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment