Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > +unset EDITOR VISUAL GIT_EDITOR > + > +test_expect_success 'determine default editor' ' > + > + vi=$(TERM=vt100 git var GIT_EDITOR) && > + test -n "$vi" > + > +' > + > +if ! expr "$vi" : '^[a-z]*$' >/dev/null > +then > + vi= > +fi > + > +for i in GIT_EDITOR core_editor EDITOR VISUAL $vi > ... > -for i in vi EDITOR VISUAL core_editor GIT_EDITOR > +for i in $vi EDITOR VISUAL core_editor GIT_EDITOR > do > echo "Edited by $i" >expect > unset EDITOR VISUAL GIT_EDITOR > @@ -78,7 +91,7 @@ done > > unset EDITOR VISUAL GIT_EDITOR > git config --unset-all core.editor > -for i in vi EDITOR VISUAL core_editor GIT_EDITOR > +for i in $vi EDITOR VISUAL core_editor GIT_EDITOR > do Beautiful ;-) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html