Subject: Re: command-line editing and "standard" shells....
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: current-users
Date: 03/19/1999 20:45:05
[ On Friday, March 19, 1999 at 16:16:17 (-0800), After 5 PM please slip brain through slot in door. wrote: ]
> Subject: Re: command-line editing and "standard" shells....
>
> > there are two alternate and mutually exclusive paradigm
> > shifts...
>
> For CURSOR KEYS? Come on, they're ARROWS, for pete's sake. There's
> no reason that they should not be enabled by default, EVEN IF VISUAL
> is unset and neither "-o emacs" nor "-o vi" have been set.
You missed the point. Cursor key handling is merely a feature of
command-line editing. You can't have the former without getting all of
the latter. Given that the latter has two mutually exclusive modes, a
choice needs to be made for the default: none, vi, or emacs.
Yes, it *could* be be implemented such that basic command-line editing
is always enabled (well, at least when in interactive mode and attached
to a tty-like device), with only the cursor keys enabled and the "set -o
vi" command could be used simply to enable some additional bindings, but
that would leave a very bad taste in my mouth.
Indeed the SUS seems to only describe vi-mode (no mention of emacs,
sigh), but does say:
The command set -o v enables vi-mode editing and places sh into vi
insert mode (see Command Line Editing (vi-mode) ). This command
also disables any other editing mode that the implementation may
provide. The command set +o v disables vi-mode editing.
Certain block-mode terminals may be unable to support shell command
line editing. If a terminal is unable to provide either edit mode,
it need not be possible to set -o v when using the shell on this
terminal.
In any case it's just so damn simple to enable the desired editing mode
in your system /etc/profile or personal ~/.profile, or in your $ENV
profile that arguing about turning it on by default is just plain
silly. Most people won't even need to know about "set -o vi" if they
use (pd)ksh because "EDITOR=vi" will do that for them.
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>