Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!ncar!noao!arizona!gudeman From: gudeman@cs.arizona.edu (David Gudeman) Newsgroups: comp.unix.shell Subject: Re: separate the command language and interactive she Message-ID: <2749@optima.cs.arizona.edu> Date: 3 May 91 23:06:48 GMT Sender: news@cs.arizona.edu Lines: 71 In article <1991May02.171036.23843@sco.COM> John R. MacMillan writes: ] ]I envision something like the following: user starts "ish -emacs fsh". ]Ish advertises a communications channel, and starts a friendly sh, ]which notices the communications channel. User types "cdb ]pro", and ish passes "cdb pro" down the communication ]channel (probably with some other info). Fsh completes to "cdb ]program", gives it back to ish... That is more-or-less what I had in mind. Taking completion as an example: each ish-ready program has a set of named things. The user wants to be able to type part of the name followed by some signal that means "complete the previous name". However, there might be several classes of name things, and you only want to complete within the correct class. For example in a clang, you want seperate completion for commands, filenames, and environment variables. Part of this can be communicated by command-line description such as ::= * | "set" = ::= "-"* | "$" | path-complete with "echo $path" path-complete with "pwd" list-complete with "variable-completion %s" Each ish-ready program would have such a specification plus a set of commands, (in this case just "variable-completion") that print out a list of possible completions. This eliminates the need for a communication channel. Type "set TE" at the prompt. The ish gathers characters until the control sequence. Then it looks at the specification for this command and finds that it must use the "variable-completion" to find the completions of this name. It sends the string variable-completion TE to the stdin of the clang which responds with TERM TERMCAP (prompt) on its stdout. The ish doesn't display this output since it is internal communication. Rather the ish parses it and completes the name as far as possible, extending the user's command line to set TERM The nice thing about this is that "variable-completion" is a normal command that anyone can type, it doesn't require any special communication apparatus. The ish has pathname completion built in, so for command and filename completion it would only ask the clang for its exec-path or current directory and do its own completion. Type "ico". The ish sends the command "echo $path" to the clang which responds with the path. Then the ish completes the command according to the path. These command-line descriptions can be fixed files that the ish accesses. The only other information the ish needs is what command is executing, and it can get that from startup messages. I'm beginning to think again that a special communication channel is not needed. If you can get by without one then you should, since the writer of ish-ready application shouldn't have to worry about that sort of thing. Is there any sort of communication that couldn't be handled by this scheme? -- David Gudeman gudeman@cs.arizona.edu noao!arizona!gudeman