Subject: Re: ksh [was: Re: miniroot for NetBSD/i386?]
To: Hubert Feyrer <feyrer@cs.stevens.edu>
From: Igor Sobrado <igor@string1.ciencias.uniovi.es>
List: port-i386
Date: 12/13/2005 11:13:57
In message <Pine.LNX.4.61.0512131026410.12122@m24s24.vlinux.de>, Hubert Feyrer writes:
>
> From ksh.1 (on Solaris 9/x86):
>
> EDITOR
> If the value of this variable ends in emacs, gmacs, or
> vi and the VISUAL variable is not set, then the
> corresponding option (see the set special command
> below) will be turned on.
>
> So I'm afraid this is even sort of documented. I'd still say it's a bug
> too, but after people shouted at me when pointing out that pax was doing
> the right thing to chmod 777 files that copied symlinks were ointing to,
> what do I know. :)
In my humble opinion, it works as documented...
$ ssh sismica0.geol.uniovi.es
sobrado@sismica0.geol.uniovi.es's password:
Last login: Tue Dec 13 10:57:36 2005 from geol00.geol.uni
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
$ VISUAL=emacs; export VISUAL
$ cat .pro<Esc><Esc> <- $ cat .profile, ksh is in emacs-mode.
[...]
$ EDITOR=vi; export EDITOR
$ cat .pro<Esc><Esc> <- $ cat .profile, ksh is in emacs-mode yet,
$ echo $EDITOR <- but the default editor is vi now.
vi
[...]
After setting VISUAL to emacs, both the shell and the editor are
set to emacs-mode. In the second example (setting EDITOR environment
variable when VISUAL is set) only the editor is changed, as VISUAL
was previous defined, ksh remains in the old mode (in this case,
in emacs-mode).
Cheers,
Igor.