Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!prls!mips!dce From: dce@mips.COM (David Elliott) Newsgroups: comp.unix.questions Subject: Re: Flaming Escapes - a Partly Baked Idea Message-ID: <1787@quacky.mips.COM> Date: 7 Mar 88 14:27:55 GMT References: <12162@brl-adm.ARPA> Reply-To: dce@quacky.UUCP (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 51 In article <12162@brl-adm.ARPA> PAAAAAR%CALSTATE.BITNET@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@mips.com or {ames,prls,pyramid,decwrl}!mips!dce