question about csh quoting

guy at rlgvax.UUCP guy at rlgvax.UUCP
Sun May 13 12:36:16 AEST 1984


> why does csh use '!' ? Is a printing character necessary?
> (does anyone still use '#' and '@' for erase and kill?)
> Why not use a non-printing character for calling up the last command?

> for example, ksh uses ^p (control-p) to retrieve the previous
> command.  You can then execute it again by hitting return, or
> edit it using emacs or vi commands.  The only problem I've
> seen with this is that all the decwriter consoles have big
> signs on them saying don't use ^p. Appariently it locks up a
> decwriter.

The C shell history mechanism does more than just retrieve the previous
command; it also permits you to extract little bits of several previous
commands and glue them back together again.  (Question: how many people
actually extract little bits of several previous commands and glue them
back together to make a new command, as opposed to retrieving a previous
command in its entirety and editing it?)  Given non-Berkeley UNIXes habit
of echoing control characters as themselves, it could be awkward to use
a non-printing character as your history character - the C shell does let
you set your history character, so if you don't like "!" you can choose
another one.

^P doesn't lock up a DECwriter, but it locks up a VAX-11 or some PDP-11
consoles.  The console is really talking to some sort of micro (LSI-11
in the case of a VAX-11/780) which interprets ^P as a control character
saying "don't act as a console to the main computer, act as a console to
the micro".

As for still using "#" and "@" as erase and kill characters, the real question
should be "why were printing characters used as erase and kill characters
in the first place?"  On Multics you sort of had to use them - you had
terminals which didn't *have* any control characters, like IBM 2741's, and
the interface to the host was half-duplex, so you couldn't do anything
clever with the erase and kill character - but UNIX ran on DEC machines
using ASCII terminals and full-duplex interfaces, which DEC used quite well
to give a reasonable user interface to the terminal driver.  Several
people (Berkeley, Harvard, etc.) have put a DEC-style terminal driver into
UNIX.  Why didn't Bell?  (And why did it take until V7 for Bell to support
XON/XOFF, and until *System III* for Bell to pick up the idea of "CRT rubout"?)

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy



More information about the Comp.unix mailing list