Aucbvax.3255
fa.unix-wizards
utzoo!decvax!ucbvax!unix-wizards
Tue Sep 22 13:38:59 1981
history in bourne shell
>From cbosg!cbosgd!mark@Berkeley Tue Sep 22 13:09:12 1981
Some general comments:

The two most useful features of csh are history and aliases.  The process
control is useful too but it requires extensive kernel mods.  If you're
going to hack sh you should probably put in both these features.  The
history code can probably be embedded in sh pretty cleanly.

It has been said that the history mechanism belongs in a virtual terminal
driver, not the shell.  Bourne was going to put in history but didn't
for this reason (as I understand it).  There is a virtual terminal system
under development here but don't hold your breath.

While the alias mechanism is also very important, even better would be
shell functions which are really parsed.  (In csh, the history mechanism
will not talk to control structures, neither will aliases.)  I heard a
rumor that Bourne has shell functions added to sh at research.  You should
check with him first and get the most recent sh.

Personally I find the csh syntax much more palatable than sh.  But I do
understand why BTL is very afraid of ever changing shells again, so I
think it would be a win to have functions and history in sh too.
(While you're at it, you might put in the ~ and {} globbing characters
of csh - they are short and sweet and useful.)  One note: the choice of
! as a history character in csh was a bad choice - ! is important for
uucp and is also hard to type.  I use , as my history character, and
the only problem I get is when I want to type {foo,bar,bletch} I
have to type {foo\,bar\,bletch}.  I do this so rarely that it's not
really a problem.  Likewise, I use ; rather than ^ as a substitute
character - it's in the same place on all keyboards and much easier to
type.  (There is no ambiguity with command separaters because it is
only special at the beginning of a line.)

       Mark Horton

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.