Skip to content

Instantly share code, notes, and snippets.

@danmux
Created October 8, 2016 16:21
Show Gist options
  • Save danmux/89feb3921e2f1ed77650fbfee5dab2f5 to your computer and use it in GitHub Desktop.
Save danmux/89feb3921e2f1ed77650fbfee5dab2f5 to your computer and use it in GitHub Desktop.
# the fasd thing
eval "$(fasd --init auto)"
# helps hide some prompt cruft in zsh
export DEFAULT_USER=dan.mullineux
makeNewBranch() {
git branch $1
git checkout $1
git push -u origin $1
}
# make and push a new branch
alias mkbr=makeNewBranch
# pretty time based (most recent activity first) list branches
alias lsbr='for k in `git branch | perl -pe s/^..//`; do echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k -- | head -n 1`\\t$k; done | sort -r'
# quick calculator
calc () {
bc -l <<< "$@"
}
# the autojump alias
alias j='fasd_cd -d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment