Permalink
Browse files

Add ability to override using $EDITOR

  • Loading branch information...
1 parent 20b3d43 commit 8c4ea4f5988b7d758be9f891943b2d3cfd2639e5 @tswicegood tswicegood committed Nov 15, 2012
Showing with 15 additions and 11 deletions.
  1. +15 −11 aliases/available/git.aliases.bash
@@ -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.