[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] Generic argument parsing & stuff
From: |
Doug Kearns |
Subject: |
Re: [RP] Generic argument parsing & stuff |
Date: |
Fri Sep 14 10:55:01 2001 |
On Saturday 15 September 2001 02:02, Gergely Nagy wrote:
> Greetings!
>
> Well, I'm currently converting the ratpoison commands to the new
> argument parsing scheme, and while there, I'm unifying the user
> interface.
>
> So, we have two new functions:
>
> *) parse_cmdline, which splits the commandline into the specified
> number of chunks
>
> *) collect_input, which first looks at the arguments supplied by
> parse_cmdline, then if there is not enough paramaters, then either
> displays an input bar (when in interactive mode), or reports a
> warning (when in non-interactive mode).
<snip>
This all sounds really nice.
How will parse_cmdline behave when 'extra' arguments are specified ?
Can it distinguish between commands like bind in which the last arg
should be 'gobbled up' and commands such as msgwait which should only
accept a specific number of args ?
The current behaviour, which is consistent, is to ignore extra args. eg.
see my unsetenv vs your unsetenv patch.
I've always found the current behaviour somewhat irksome :)
Thanks for all the work.
Regards,
Doug