Skip to content

Instantly share code, notes, and snippets.

@dherbold
Last active October 2, 2017 18:15
Show Gist options
  • Save dherbold/576d9918e5878aec9b118f15691023e7 to your computer and use it in GitHub Desktop.
Save dherbold/576d9918e5878aec9b118f15691023e7 to your computer and use it in GitHub Desktop.
Simple bash tweaks for better living.
cd /Users/david/Sites
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
#lazygit "My commit msg" http://stackoverflow.com/questions/19595067/git-add-commit-and-push-commands-in-one
function lg() {
git add .
git commit -a -m "$1"
git push
}
function gs() {
git status
}
function sites() {
cd /Users/david/Sites/
}
function kbox() {
cd /Users/david/Kalabox/
}
export PS1="pneaumme\$(parse_git_branch): "
export PATH="/usr/local/sbin:$PATH"
PATH="/usr/local/bin:$PATH"
# Trigger ~/.bashrc commands
. ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment