summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/global.cc13
-rw-r--r--src/global.h1
2 files changed, 10 insertions, 4 deletions
diff --git a/src/global.cc b/src/global.cc
index 598aee48..c2a86569 100644
--- a/src/global.cc
+++ b/src/global.cc
@@ -67,10 +67,12 @@ global_scope_t::global_scope_t(char ** envp)
// Before processing command-line options, we must notify the session object
// that such options are beginning, since options like -f cause a complete
// override of files found anywhere else.
- session().set_flush_on_next_data_file(true);
- read_environment_settings(envp);
- session().set_flush_on_next_data_file(true);
- read_init();
+ if (! HANDLED(args_only)) {
+ session().set_flush_on_next_data_file(true);
+ read_environment_settings(envp);
+ session().set_flush_on_next_data_file(true);
+ read_init();
+ }
}
global_scope_t::~global_scope_t()
@@ -231,6 +233,9 @@ int global_scope_t::execute_command_wrapper(strings_list args, bool at_repl)
option_t<global_scope_t> * global_scope_t::lookup_option(const char * p)
{
switch (*p) {
+ case 'a':
+ OPT(args_only);
+ break;
case 'd':
OPT(debug_);
break;
diff --git a/src/global.h b/src/global.h
index 883972fc..1fb3e157 100644
--- a/src/global.h
+++ b/src/global.h
@@ -112,6 +112,7 @@ See LICENSE file included with the distribution for details and disclaimer.";
virtual expr_t::ptr_op_t lookup(const string& name);
+ OPTION(global_scope_t, args_only);
OPTION(global_scope_t, debug_);
OPTION(global_scope_t, full_help); // -H