Skip to content

Commit

Permalink
[main] Added --always-load-config command-line option. Refs #137
Browse files Browse the repository at this point in the history
This option loads config on 2nd instance of ELinks and next.
It can be useful in alias.
  • Loading branch information
rkd77 committed Jan 4, 2022
1 parent 016686a commit dfe9186
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,10 @@ printconfigdump_cmd(struct option *option, char ***argv, int *argc)

union option_info cmdline_options_info[] = {
/* [gettext_accelerator_context(IGNORE)] */
INIT_OPT_BOOL("", N_("Load config also for slave instances"),
"always-load-config", 0, 0,
N_("Load config also for slave instances. Slower, but more robust.")),

INIT_OPT_BOOL("", N_("Restrict to anonymous mode"),
"anonymous", 0, 0,
N_("Restricts ELinks so it can run on an anonymous account. "
Expand Down
4 changes: 4 additions & 0 deletions src/main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ init(void)
init_modules(builtin_modules);
}

if (get_cmd_opt_bool("always-load-config")) {
parse_options_again();
}

if (get_cmd_opt_bool("dump")
|| get_cmd_opt_bool("source")) {
/* Dump the URL list */
Expand Down

0 comments on commit dfe9186

Please sign in to comment.