Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: > The quickest workaround for this is probably to special-case the editor > `echo`: "GIT_EDITOR=: git cmd" would also be a common trick people would use to bypass editor and take whatever is given as an initial template. > However, I could imagine that other scenarios call for an editor that > _also_ does not run in the terminal, and where also no real terminal is > available for saving and restoring. > > I was tempted to suggest an `isatty(2)`, but that probably comes with its > own problems, too. I think isatty(2) is pretty much our synonym to "are we talking to an end-user sitting in front of the terminal". Mostly we use it as a way to control the progress bars, and use of editor on terminal would be in line with these existing uses.