[Freeciv-Dev] Re: readline completion
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Den tor, 20 jul 2000 skrev David Pfitzner:
> Thue <thue@xxxxxxx> wrote:
>
> > Completes function names, server option names, player names and filenames
> > where appropriate.
>
> Nice. (Debian 2.1, readline 4.1).
It would be nice if someone with readline 2.x would test it too :)
> Comments:
>
> You don't need to write str_dub(), we already have mystrdup()
> in support.c?
No we hadn't. Now we have.
> You write:
>
> + If there were a command that could use completions from two of these
> + types (say, you could issue the command followed by either a filenames
> + or a player names) it would not currently be possible. But currently no
> + commands need this */
>
> Actually there is: 'help' takes command names and option names
> (plus a few help-specific options).
I still haven't made "help" do this. A not exstremely ugly hack would do
it, but I don't even think it would be nice.
> There are also a few other odd-ball server options not covered,
> not sure if it is worth doing so... Eg, cmdlevel, rulesout...
> 'show' should be added to server_option_cmd[].
All these now work.
> Not sure if it would be appropriate to integrate this more with
> the existing code (or change the existing code) which supports
> abbreviated arguments -- see optname_accessor(), helparg_accessor()
> etc.
>
> -- David
I don't think it would be worth the effort. The new code is quite simple.
You (not me at least :) could also make it all very generel with number of
arguments and arguments that could be two groups (fx commands and
options), but that would be a lot of work.
Take a look at it now and see if it is too horrible to put into CVS :). I
think it is good enough.
-Thue
completion2.diff
Description: Text Data
|
|