Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > Expose the command used by launch_editor() for scripts to use. > This should allow one to avoid searching for a proper editor > separately in each command. Ok, so the idea is... * git_editor(void) uses the logic to decide which editor to use that used to live in launch_editor(). The function returns NULL if there is no suitable editor; the caller is expected to issue an error message when appropriate. * launch_editor() uses git_editor() and gives the error message the same way as before when EDITOR is not set. * "git var GIT_EDITOR" gives the editor name, or an error message when there is no appropriate one. * "git var -l" gives GIT_EDITOR=name only if there is an appropriate editor. The above all look sensible, but IIRC, the true "vi" fell back on "ex" mode on dumb terminals and was usable as a line editor, so we should be able to run it even on dumb terminals. I do not know about vi-clones though. -- 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