[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/44347: sh does not respect editrc
The following reply was made to PR bin/44347; it has been noted by GNATS.
From: David Laight <david%l8s.co.uk@localhost>
Subject: Re: bin/44347: sh does not respect editrc
Date: Sat, 8 Jan 2011 14:12:56 +0000
On Sat, Jan 08, 2011 at 09:20:01AM +0000, jmmv%netbsd.org@localhost wrote:
> >Number: 44347
> >Category: bin
> >Synopsis: sh does not respect editrc
> System: NetBSD blackbird 5.99.43 NetBSD 5.99.43 (GENERIC) #0: Fri Jan 7
> 23:25:13 GMT 2011
> Architecture: i386
> Machine: i386
> /bin/sh does not respect the editing mode set in ~/.editrc (nor it
> does respect whether editing is enabled/disabled at all).
> The problem is that sh will only enable editing if set -V or set -E
> are specified, defaulting to editing disabled otherwise.
That is the way it needs to be :-)
The edit mode for a shell comes from the shells initialisation files.
I'm not rure how you reconcile this with setup from .editrc, particulary
since the effect of switching the shell between 'vi' and 'emacs' line
editing has to work correctly - even though the .editrc mappings can
only (probably) apply to one of the modes.
filename completion is, in patticular, a double edged sword.
I don't necessarily enable it, I type <tab> chars inside commands and
filename completetion makes that a PITA (it really ought to be disabled
inside single quotes).
Command name completion is even more problematical, since it causes confusing
network delays if any of your path references a network filesystem.
Then we get the versions that use CDPATH when completing for 'cd' - which
is again a pita.
> In other words: the defaults for the interactive shell should be those
> provided by ~/.editrc or, if not present, those built in into libedit.
> It is up to the user to later override these values by either selecting
> a particular editing mode or disabling it altogether.
The presence of libedit shouldn't affect the shell.
The shell uses libedit to implement it's own command editing.
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |