Navigation Menu

Skip to content

Commit

Permalink
Add ability to override using $EDITOR
Browse files Browse the repository at this point in the history
  • Loading branch information
tswicegood committed Nov 15, 2012
1 parent 20b3d43 commit 8c4ea4f
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions aliases/available/git.aliases.bash
Expand Up @@ -28,14 +28,18 @@ alias gdel='git branch -D'
alias gmu='git fetch origin -v; git fetch upstream -v; git merge upstream/master'
alias gll='git log --graph --pretty=oneline --abbrev-commit'

case $OSTYPE in
linux*)
alias gd='git diff | vim -R -'
;;
darwin*)
alias gd='git diff | mate'
;;
*)
alias gd='git diff'
;;
esac
if [ -z "$EDITOR" ]; then
case $OSTYPE in
linux*)
alias gd='git diff | vim -R -'
;;
darwin*)
alias gd='git diff | mate'
;;
*)
alias gd='git diff'
;;
esac
else
alias gd="git diff | $EDITOR"
fi

0 comments on commit 8c4ea4f

Please sign in to comment.