What am I missing? Command line history
In article <bmw01-1310962143240...@nntp.best.com> bm...@best.com (B M Weiss) writes:
You are talking about command line editing for the C-shell. SCO
systems have come with C-shell and Korn shell, as well as the original
Unix Bourne shell (which has no history). I much prefer the Korn
shell, as it executes Bourne shell scripts (plus some additions),
which are much more powerful than the C-shell scripting capabilities.
I also find the history much easier to use.
To set up history for C-shell, as I recall, you have to have a
"history" operator with a number in your .cshrc. The prototypes SCO
provides (in /usr/lib/mkuser on my ODT 2 system) which are mapped into
new user directories when they are added are good starting points for
each of the shells. Also note the /etc/profile and /etc/cshrc files,
which are executed before the local directory files on login.
To get history and editing on Korn shell (/bin/ksh), you have to
specify an editor in the environment. I use
export VISUAL EDITOR
in my .profile files. I include this in the root directory as well,
although I have strong feelings that all machines should always use
/bin/sh as the root login shell. If I want Korn shell features, I
simply type ksh at the command prompt.
If you want to use Emacs-style editing, and use Emacs on your system,
substitute EDITOR=emacs in the above. There are other ways to specify
the editor to ksh (man ksh for details).
You may expect up-arrow and down-arrow command recall. That is a DEC
peculiarity, added to their csh and ksh on Ultrix systems (and, I
think, on their OSF-1/DEC Unix product). The standard ksh vi editing
is hjkl positioning. The editing is strictly vi---no ex commands.
Be serious about using /bin/sh and nothing else as the root login
shell. I've forgotten all the pitfalls of using another shell in
root, but if you use another shell, particularly csh or tcsh, which
won't handle Bourne shell script language, you'll get burned badly
sooner or later. I wouldn't advise ksh either. If you want another
shell when working as root, either add another account at uid/gid 0:0
with another login name, or accept invoking your favored shell over
the Bourne shell when you are working in root.
Hank van Cleef
E-mail vancl...@netcom.com or vancl...@tmn.com