Till we decide on a restructure, here is the patch for --no-config. This patch is made against master, but is required in parallel-wget too. @Giuseppe: Maybe you could cherry pick this? Or merge master into parallel-wget, especially since we've just released a new version.
On Tue, Jan 21, 2014 at 8:17 AM, Darshit Shah <[email protected]> wrote: > > 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. >> > The reason for having the separate loop is as follows: > > In case the user wants to use a config file that is not /etc/wgetrc and > ~/.wgetrc, then they may use the --config option. However, We tend to > initialize the settings from these files before beginning to read the > command line arguments. This would cause wrong settings to be read from the > default config files. Hence, we run a loop to simply check for the --config > option and then parse the given wgetrc file before parsing the rest of the > options. > > I have simply added another check to that first loop. I too would like to > implement this in a different manner. Do you have any ideas that we could > use to implement this? > > There's a couple of implementation ideas I currently have, but I'll have > to go back to the code and check its feasibility first. If it looks > possible, I'll send a new RFC with the precise details of how I intend to > implement this. > > > -- > Thanking You, > Darshit Shah > > -- Thanking You, Darshit Shah
