separate the command language and interactive she
Felix Lee
flee at cs.psu.edu
Sun May 5 16:16:25 AEST 1991
> <command-line> ::= <command> <arg>* | "set" <var> = <arg>
> <arg> ::= "-"<char>* | "$"<var> | <file>
> path-complete <command> with "echo $path"
> path-complete <file> with "pwd"
> list-complete <var> with "variable-completion %s"
Let's see. The syntax is naive: it doesn't do quoting of any sort, so
you can't do file completion on files with special characters in it.
How about completing filenames with variables embedded: "$HOME/$a/a".
How about history completion: expand things like "!$" and "!vi".
How about glob completion: expand things like "*" and "f*".
A more serious problem: the shell isn't the only thing that
wants/needs completion. gdb, for example, wants to do completion.
Teaching the front-end about all this gets ugly.
The simplest way to handle completion is to have a communication
channel between the front-end and the current interactive process.
(Which immediately has two problems in Unix: What's the "current
interactive process"? How do I talk to it? (So how do we fix Unix?))
--
Felix Lee flee at cs.psu.edu
More information about the Comp.unix.shell
mailing list