[Gambas-user] Args help , most other places is -?

Benoit Minisini benoit.minisini at gambas-basic.org
Sun Jul 3 17:58:58 CEST 2022


Le 02/07/2022 à 13:04, Bruce Steers a écrit :
> 
> 
> On Thu, 30 Jun 2022 at 13:21, Benoit Minisini 
> <benoit.minisini at gambas-basic.org 
> <mailto:benoit.minisini at gambas-basic.org>> wrote:
> 
>     Le 30/06/2022 à 02:21, Bruce Steers a écrit :
>      >
>      > Fair point. Now I'm thinking harder I can't think of any other
>     reason
>      > myself other than -?
>      > Maybe I could make it check for -? With a property? 
>     Args.QuestionMarkIsHelp
> 
>     Just let the user handle both cases if he wants, and implement both
>     options in the default help management.
> 
> 
> Problem was what if the user wants to use -? for help and -h for 
> something else?  It was impossible as Args uses -h if you want it to or 
> not there was no choice.
> Last commit i removed the HelpShortName property that let you change the 
> help short name and replaced it for a simpler NoHelp property.
> 
> Is that more acceptable?
> If Args.NoHelp = True then neither -h or --help is used and you can then 
> enter what ever you like manually.
> 
> Respects
> BruceS
> 

'gb.args' is for implementing a standard command-line argument support. 
As soon as the user wants to do something "stupid" (like using '-h' for 
something other than help), I think 'gb.args' must not support it.

This is the same reason why I think implementing simple option merge 
('-ab' == '-a -b') must not be optional.

Regards,

-- 
Benoît Minisini.


More information about the User mailing list