On 29/10/15 16:53, Thorsten Glaser wrote:
Nicholas Bamber dixit:

you think about it. That is in both the 'fc' command defaults to using ed which
does not by default exist. At the very least both packages ought to have  a

I think that it’s a bug that it doesn’t exist by default ;-)
Both Korn shells originate on real Unix systems where it does.

Well maybe. But then some might argue the existence of Windows is bug. It's not going to go away. BAsically your argument implies that any development away from the UNIX of K&R or whatever is a bug. I can see where you might coming from. By this argument all modern languages are a bug because they are not in the form spoken at the time of Caesar.


Anyway, changing the FCEDIT default is a huge no-go, especially
for script compatibility,

Well bash doesn't set ed as the default anymore. So I don't see why other shells should.

Also I would have thought the fc functionality is an intrinsically interactive piece of functionality. What sort of script would depend on the fc default being 'ed'? And if a script did somehow interact with fc surely it would respect the values of FCEDIT and HISTEDIT.


but users can be encouraged to use a
different editor (if people really demand this, I could imagine
setting one in /etc/skel/.mkshrc for Debian specifically).

Yeah I did think of setting /etc/skel/.kshrc . I don't see that that entirely solves the problem.

For example I thought of creating

/etc/profile.d/ksh_defaults

HISTEDIT appears to be used only by ksh. However that looks wrong as stuff would be bound to creep into it that would impact other shells. Also it is too much of an accident that HISTEDIT is used only by ksh. I could check what the shell was, but that feels too complicated and fragile.

Perhaps using debconf the postinst could offer to copy /etc/skel/.kshrc to users home directories that do not have a .kshrc (and chown it). I reckon it comes down to that or patching ksh to not have ed as the default.


bye,
//mirabilos


Reply via email to