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

Bruce Steers bsteers4 at gmail.com
Mon Jul 4 13:51:32 CEST 2022


I understand guys and i get it, and it's admirable that you stick to the
conventions.

But...  ;)

I think gambas on the whole is not so "mainstream" Ie. the majority of
software being made out there is not for general public use but personal
utilities being made for individual users/business/coders.

So the "option" to break from the norm I think is awesome, Other Bruce
would have found the non-grouping method useful for his unique needs.
Others may too.

But, as i keep trying to tell myself, I need to stop dicking around with
Benoits software. So I'm going to provide some kind of alternative
selection of components/classes.

All the best.
BruceS


On Mon, 4 Jul 2022 at 12:04, Tim Dickson via User <
user at lists.gambas-basic.org> wrote:

> see.
> https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html
> guidleine 3.
> limits short (single character) options to alnum which does not include
> punct such as "?"
> obviously this is for utilities, but is generally used in general
> unix/linux applications as well.
> ? is a dos/windows convention, using /? but this is not used in
> unix/linux as -h or --help is convention and ? is a test operator and a
> wildcard in scripting.
>
> On 04/07/2022 11:17, Benoit Minisini wrote:
> > Le 04/07/2022 à 11:43, Bruce Steers a écrit :
> >>
> >>
> >> On Sun, 3 Jul 2022 at 16:59, Benoit Minisini
> >> <benoit.minisini at gambas-basic.org
> >> <mailto:benoit.minisini at gambas-basic.org>> wrote:
> >>
> >>     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>
> >>      > <mailto: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,
> >>
> >>
> >> Sorry my friend but i can't help but disagree a bit.
> >> Personally i think -? is even better than -h for help, because it's
> >> language universal.
> >
> > Indeed, but it seems there is some sort of implicit standard of using
> > "-h" for help almost everywhere (options are in english).
> >
> > I wanted 'gb.args' to implement that implicit standard, not to handle
> > all the different possible command-line syntaxes, so that it is the
> > simplest possible.
> >
> > For the same reason, I think grouping single character options is part
> > of that implicit standard, and so I don't think it should be optional.
> > "-ab" has no meaning in that syntax.
> >
> > (I personnaly don't like these programs that do not follow this
> > standard as much as possible).
> >
> > If you start adding option for this and that, you will never finish,
> > as there is a lot of different syntaxes possible. Maybe you should
> > create another component, an advanced version of gb.args?
> >
> > On the contrary, a possible "standard" command-line syntax that should
> > be added to 'gb.args' is the support for "sub-command" of complex
> > tools, like "git", where you type "git" followed by the sub command,
> > and then the options that change according to the command.
> >
> > Regards,
> >
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220704/cbdef301/attachment-0001.htm>


More information about the User mailing list