seperate the command language and interactive she

David Gudeman gudeman at cs.arizona.edu
Sun Apr 21 03:31:21 AEST 1991


Maybe I'm missing something, but it seems to me that many of the Unix
shells combine two seperable functions: the command language and the
interactive shell.  Is there some advantage to this?  It seems to me
that there would be several advantages to seperating them.

First, by "command language" I mean the functionality of parsing the
command lines and invoking programs.  By "interactive shell" I mean
command-line editing and history mechanisms.  Filename globing and
process control are probably best considered part of the command
language (but I'm not sure about that).

I can think of the following advantages to seperating these two
functionalities:

(1) users would have more options.  They would not have to pick the
shell that gives them the best command-line editing even though they
don't like the control structure syntax.  Of course you can partly get
around that problem now by using different shells for interactive vs.
script purposes, but that is not ideal.

(2) the features of the interactive shell could be used for other
programs.  For example, the history mechanism could have different
history lists for different prompts, and every program with a
recognizable prompt could be used with the exact same history
mechanism and command-line editing as the shell.  And those other
programs would not have to implement interactive functions (as many
do).

(3) related to (2), programs that present virtual terminals (like
xterm and emacs) could have a complete window-editing environment
without having to load those functions for the shell as well.

(4) the command language program could be smaller, possibly giving
faster startup for system() calls.
--
					David Gudeman
gudeman at cs.arizona.edu
noao!arizona!gudeman



More information about the Comp.unix.shell mailing list