aliases: git: consistent behavior for git users
The case block in git.aliases.bash does the right thing for vim users that do not populate $EDITOR. However vim users that populate $EDITOR are met with the following error: $ gd Vim: Warning: Input is not from a terminal Vim: Error reading input, exiting... Vim: preserving files... Vim: Finished. Fix this inconsistency by adding another case block in the else block which handles passing the appropriate arguments to vim. Signed-off-by: Michael Turquette <mturquette@deferred.io>pull/182/merge^2
parent
6140b8fe0b
commit
4fba1ce6d2
|
|
@ -47,5 +47,11 @@ if [ -z "$EDITOR" ]; then
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
alias gd="git diff | $EDITOR"
|
case $EDITOR in
|
||||||
|
*vim*)
|
||||||
|
alias gd="git diff | $EDITOR -R -"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
alias gd="git diff | $EDITOR"
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue