On Thu, Jan 1, 2009 at 3:25 AM, Richard S. Hall <[email protected]> wrote:
> p.s. There is a difference between command API and things like command
> completion and history. The former deals with core capabilities, while the
> latter deals with UI issues. The core shouldn't assume a UI. Sometimes it
> seems that people lump these two together.
Command completion, yes. Parameter completion (which is what normal
shell users expect these days), no. Take the following:
ls --<tab>
How can the shell determine the list of possible completions?
#1: Have a method where you pass the current String[] and the partial
input for the next parameter, and it returns an array of possible
completions for the parameter.
#2: Add semantics for commands so that a command can be interrogated
for its list of flags and the type of its arguments.
It's not like this is useful only from a real console. If #2 were
implemented then a web page would be able to generate a pretty form
for executing a command, instead of the user having to type out the
string. :-)
Granted some shell interfaces won't have a way to complete (command
via instant message for instance.) So maybe this sort of rich shell
command needs to be a sub-interface.
TX
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]