In case of a conflict between --config and --no-config, the one
that appears first will be considered and the other ignored.
Please send GNU Wget bug reports to <bug-wget@gnu.org>.
\f
* Changes in Wget X.Y.Z
Please send GNU Wget bug reports to <bug-wget@gnu.org>.
\f
* Changes in Wget X.Y.Z
+
+** Introduce --no-config.
\f
* Changes in Wget 1.15
\f
* Changes in Wget 1.15
+2014-01-17 Darshit Shah <darnir@gmail.com>
+
+ * init.c (commands[]): Add --no-config.
+ * options.h: Same.
+ * main.c (option_data[]): Same.
+ (print_help): Same.
+ (main): If --no-config is set, then do not read the wgetrc files.
+
2014-01-05 Håkon Vågsether <hauk142@gmail.com> (tiny change)
* http.c (http_loop): Fix checking the URL length when filename is
2014-01-05 Håkon Vågsether <hauk142@gmail.com> (tiny change)
* http.c (http_loop): Fix checking the URL length when filename is
#ifdef ENABLE_DEBUG
{ "debug", &opt.debug, cmd_boolean },
#endif
#ifdef ENABLE_DEBUG
{ "debug", &opt.debug, cmd_boolean },
#endif
- { "defaultpage", &opt.default_page, cmd_string },
+ { "defaultpage", &opt.default_page, cmd_string },
{ "deleteafter", &opt.delete_after, cmd_boolean },
{ "dirprefix", &opt.dir_prefix, cmd_directory },
{ "dirstruct", NULL, cmd_spec_dirstruct },
{ "deleteafter", &opt.delete_after, cmd_boolean },
{ "dirprefix", &opt.dir_prefix, cmd_directory },
{ "dirstruct", NULL, cmd_spec_dirstruct },
{ "mirror", NULL, cmd_spec_mirror },
{ "netrc", &opt.netrc, cmd_boolean },
{ "noclobber", &opt.noclobber, cmd_boolean },
{ "mirror", NULL, cmd_spec_mirror },
{ "netrc", &opt.netrc, cmd_boolean },
{ "noclobber", &opt.noclobber, cmd_boolean },
+ { "noconfig", &opt.noconfig, cmd_boolean },
{ "noparent", &opt.no_parent, cmd_boolean },
{ "noproxy", &opt.no_proxy, cmd_vector },
{ "numtries", &opt.ntry, cmd_number_inf },/* deprecated*/
{ "noparent", &opt.no_parent, cmd_boolean },
{ "noproxy", &opt.no_proxy, cmd_vector },
{ "numtries", &opt.ntry, cmd_number_inf },/* deprecated*/
{ "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
{ "no", 'n', OPT__NO, NULL, required_argument },
{ "no-clobber", 0, OPT_BOOLEAN, "noclobber", -1 },
{ "mirror", 'm', OPT_BOOLEAN, "mirror", -1 },
{ "no", 'n', OPT__NO, NULL, required_argument },
{ "no-clobber", 0, OPT_BOOLEAN, "noclobber", -1 },
+ { "no-config", 0, OPT_BOOLEAN, "noconfig", -1},
{ "no-parent", 0, OPT_BOOLEAN, "noparent", -1 },
{ "output-document", 'O', OPT_VALUE, "outputdocument", -1 },
{ "output-file", 'o', OPT_VALUE, "logfile", -1 },
{ "no-parent", 0, OPT_BOOLEAN, "noparent", -1 },
{ "output-document", 'O', OPT_VALUE, "outputdocument", -1 },
{ "output-file", 'o', OPT_VALUE, "logfile", -1 },
-B, --base=URL resolves HTML input-file links (-i -F)\n\
relative to URL.\n"),
N_("\
-B, --base=URL resolves HTML input-file links (-i -F)\n\
relative to URL.\n"),
N_("\
- --config=FILE Specify config file to use.\n"),
+ --config=FILE Specify config file to use.\n"),
+ N_("\
+ --no-config Do not read any config file.\n"),
longindex = -1;
int retconf;
bool use_userconfig = false;
longindex = -1;
int retconf;
bool use_userconfig = false;
while ((retconf = getopt_long (argc, argv,
short_options, long_options, &longindex)) != -1)
while ((retconf = getopt_long (argc, argv,
short_options, long_options, &longindex)) != -1)
{
confval = long_options[longindex].val;
config_opt = &option_data[confval & ~BOOLEAN_NEG_MARKER];
{
confval = long_options[longindex].val;
config_opt = &option_data[confval & ~BOOLEAN_NEG_MARKER];
- if (strcmp (config_opt->long_name, "config") == 0)
+ if (strcmp (config_opt->long_name, "no-config") == 0)
+ {
+ noconfig = true;
+ break;
+ }
+ else if (strcmp (config_opt->long_name, "config") == 0)
{
bool userrc_ret = true;
userrc_ret &= run_wgetrc (optarg);
{
bool userrc_ret = true;
userrc_ret &= run_wgetrc (optarg);
}
/* If the user did not specify a config, read the system wgetrc and ~/.wgetrc. */
}
/* If the user did not specify a config, read the system wgetrc and ~/.wgetrc. */
- if (use_userconfig == false)
+ if (noconfig == false && use_userconfig == false)
initialize ();
opterr = 0;
initialize ();
opterr = 0;
char *lfilename; /* Log filename */
char *input_filename; /* Input filename */
char *choose_config; /* Specified config file */
char *lfilename; /* Log filename */
char *input_filename; /* Input filename */
char *choose_config; /* Specified config file */
bool force_html; /* Is the input file an HTML file? */
char *default_page; /* Alternative default page (index file) */
bool force_html; /* Is the input file an HTML file? */
char *default_page; /* Alternative default page (index file) */