[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] General Testsuite issue
From: |
Tim Ruehsen |
Subject: |
Re: [Bug-wget] General Testsuite issue |
Date: |
Mon, 20 Jan 2014 15:53:09 +0100 |
User-agent: |
KMail/4.11.3 (Linux/3.12-1-amd64; KDE/4.11.5; x86_64; ; ) |
On Saturday 18 January 2014 23:51:07 Darshit Shah wrote:
> On Sat, Jan 18, 2014 at 2:05 AM, Tim Rühsen <address@hidden> wrote:
> > Am Freitag, 17. Januar 2014, 11:42:41 schrieb Tony Lewis:
> > > Darshit Shah wrote:
> > > > In case both the --config and --no-config commands are issued, the one
> > >
> > > that
> > >
> > > > appears first on the command will be considered and the other ignored.
> > >
> > > Given my memory of the way the parsing loop works, I would expect that
> > > it
> > > would use the last one that appears. How do GNU commands usually handle
> > > multiple instances of a command option?
> >
> > Wget, as most tools, parse the argument from left to right, the second
> > overwriting the first. Else (e.g. if arguments 'sum up'),it should be
> > explicitly mentioned in the docs.
> >
> > True. While Wget's command parser loop would usually accept the last
>
> instance of the option, this is an exception. One of the chief reasons I
> RFC'ed this patch.
OK, i missed that.
> The --config option is detected just before the other options by running
> the same loop a little earlier. However, to same CPU cycles, we break out
> of the loop as soon as --config is identified. I have extended that loop so
> that it detects --no-config too and breaks out the moment either one of
> these is seen. Hence, only the first instance is acted upon, while the
> others are silently discarded.
Thanks for making this point clear.
I don't understand the reason for the --config exception and I would
definitely implement it in a different way... but changing it will break
compatibility.
So, the way you did it seems straight forward and correct.
Tim
- [Bug-wget] General Testsuite issue, Tim Ruehsen, 2014/01/17
- Re: [Bug-wget] General Testsuite issue, Darshit Shah, 2014/01/17
- Re: [Bug-wget] General Testsuite issue, Tony Lewis, 2014/01/17
- Re: [Bug-wget] General Testsuite issue, Tim Rühsen, 2014/01/17
- Re: [Bug-wget] General Testsuite issue, Darshit Shah, 2014/01/18
- Re: [Bug-wget] General Testsuite issue,
Tim Ruehsen <=
- Re: [Bug-wget] General Testsuite issue, Darshit Shah, 2014/01/20
- Re: [Bug-wget] General Testsuite issue, Darshit Shah, 2014/01/21
- Re: [Bug-wget] General Testsuite issue, Giuseppe Scrivano, 2014/01/22
- Re: [Bug-wget] General Testsuite issue, Tim Ruehsen, 2014/01/22
- Re: [Bug-wget] General Testsuite issue, Darshit Shah, 2014/01/22
- Re: [Bug-wget] General Testsuite issue, Tim Ruehsen, 2014/01/23
- Re: [Bug-wget] General Testsuite issue, Darshit Shah, 2014/01/24