Re: [hackers] [abduco] [PATCH] Allow squashing of command line flags together

From: Marc André Tanner <mat_AT_brain-dump.org>
Date: Fri, 7 Aug 2015 09:31:29 +0200

On Fri, Jul 31, 2015 at 10:17:48AM +1200, David Phillips wrote:
> Currently, abduco only supports command line flags kept separate, eg
> `abduco -c -f foo bar`. This patch changes the parser to treat `-abc`
> as being equal to `-a -b -c`, effectively allowing options to be
> 'squashed' together. This would mean `abduco -c -f foo bar` could
> equally be expressed as `abduco -cf foo bar`.
>
> As an additional note, I had a play around with switching to getopt
> rather than reinventing the wheel as abduco currently does. I could
> submit that patch also/instead if it would be preferred over this one.

Yes please also submit the getopt based one. From a quick glance
the one you posted probably has issues handling the -e option which
takes an argument (and hence advances the arg variable).

-- 
 Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: CF7D56C0
Received on Fri Aug 07 2015 - 09:31:29 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 07 2015 - 09:36:11 CEST