]> git.phdru.name Git - dotfiles.git/blobdiff - .gitconfig
.gitconfig: prefer $VISUAL over $EDITOR; use vi as the last resort
[dotfiles.git] / .gitconfig
index a2a361d04dc78876a85c22e0e1c63c77a1687fdc..e99fce73d4e95ba8a0504032752f60fac353935b 100644 (file)
 
   # Editing and adding conflicted files: when we get many merge conflicts
   # and want to quickly solve them using an editor, then add the  files.
-  edit-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; $EDITOR `f`"
+  edit-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; "${VISUAL:-${EDITOR:-vi}}" `f`"
   add-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
 
   # Get the current branch name