On Mon, Sep 23, 2024 at 22:59:42 +0200, tlaro...@kergis.com wrote: > In commit 684f0c282018583d8983ab6b3218c03da6841159, uwe writes: > > TBH, I was a bit incredulous, but sh's own fc _does_ use ed if EDITOR > is not set, though it seems to be the only program in base to do > this. Speak of a self-fulfilling prophecy... > > IMHO, sh(1) is right here. Ed(1) is the only _line_ editor. Others > require 2D interface (even if only with curses; that's 2D > nonetheless). > > Sh(1) has to be useful in case of disaster and very limited (line > interaction) connection means. Ed(1) is the only vital editor. The > variable can be defined to suit the user needs, via the > configuration files so the default can be overwritten. > > ed(1) is in bin/. (external) nvi(1) is in usr.bin/. And this is logical. > (Even if vi is added to rescue; but you have to have a terminal > behaving correctly for curses (or the reverse), and there are bugs in > vi(1).) > > So, IMHO, the default, in code, should stay with ed(1). The question > would be whether other utilities have the wrong default (depending on > whether they are considered crucial enough to get things running)...
Oh, I was not trying to denigrate ed(1) or sh(1)'s choice of the default, or suggest that the default has to change. I remember times when ed(1) was _the_ default, but I kinda expected everyone moved on, so the fact that fc uses ed was indeed a surpise. Perhaps I didn't choose the right word to convey that surpise and brought in unintended negative connotations. Otherwise - Amen! I'm not the most savvy ed user, but it saved my hide on quite a few occasions, that involved dec lp11 (iirc) console typewriter, broken terminal emulator in windows dialup program, etc... -uwe