Flaming Escapes - a Partly Baked Idea
David Elliott
dce at mips.COM
Tue Mar 8 00:27:55 AEST 1988
In article <12162 at brl-adm.ARPA> PAAAAAR%CALSTATE.BITNET at cunyvm.cuny.edu writes:
>I want to ventilate a peeve that I have developed over two or three years
>of Unix usage, admin and hackery. It is about "shell escapes".
...
>How else could it work, you ask?
>Try this
> If the input fails to parse as a command in the current program,
> the program tests to see if it is a valid shell command and if and only
> if it is the program spawns a shell to obey it.
While the sentiment is sound, there are some difficulties that come to
mind:
1. How do you handle extensions to the parsed language?
2. There are incompatabilities between parsed languages. How do
you explain to a naive user that typing 'x' in one command
exits the command, while 'x' in another executes a shell command
called 'x'.
3. The only reasonable way to test if something is a shell command
is to go ahead and try (otherwise, you have to put the
intelligence of the shell into the program). If you say "only
shell builtins", you have to assume a shell (many people have
written their own shells), and most shell builtins are not
useful alone.
4. How do you handle spelling errors? "I typed the word edit
instead of exit and it threw me into the editor." There
are worse cases that can be conceived.
5. Many interactive commands use special terminal modes that
make it impossible to use a shell lexeme analyzer.
At least with !, you know what you are getting yourself into.
In any event, what you want is a form of job control. Instead of
cluttering up each program with a shell escape mechanism, you provide
a way to escape from the current command to execute new commands.
There are many ways to do this: Berkeley job control, shell layers,
windows; all currently implemented and shown to be quite useful.
> Copywrite: Richard J Botting, Cal State U, San Berd'o, 1988.
> The above ideas can be used and quoted free of charge by anyone
> as long as this notice is included with the quotation.
It's spelled "copyright". I wonder, does the fact that the spelling
is incorrect affect the validity of the copyright? The validity of
the request?
--
David Elliott dce at mips.com or {ames,prls,pyramid,decwrl}!mips!dce
More information about the Comp.unix.questions
mailing list