Added --args-only flags, to ignore init and env
This commit is contained in:
parent
d0a664d102
commit
5e1870e259
2 changed files with 10 additions and 4 deletions
|
|
@ -67,11 +67,13 @@ global_scope_t::global_scope_t(char ** envp)
|
||||||
// Before processing command-line options, we must notify the session object
|
// Before processing command-line options, we must notify the session object
|
||||||
// that such options are beginning, since options like -f cause a complete
|
// that such options are beginning, since options like -f cause a complete
|
||||||
// override of files found anywhere else.
|
// override of files found anywhere else.
|
||||||
|
if (! HANDLED(args_only)) {
|
||||||
session().set_flush_on_next_data_file(true);
|
session().set_flush_on_next_data_file(true);
|
||||||
read_environment_settings(envp);
|
read_environment_settings(envp);
|
||||||
session().set_flush_on_next_data_file(true);
|
session().set_flush_on_next_data_file(true);
|
||||||
read_init();
|
read_init();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
global_scope_t::~global_scope_t()
|
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)
|
option_t<global_scope_t> * global_scope_t::lookup_option(const char * p)
|
||||||
{
|
{
|
||||||
switch (*p) {
|
switch (*p) {
|
||||||
|
case 'a':
|
||||||
|
OPT(args_only);
|
||||||
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
OPT(debug_);
|
OPT(debug_);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -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);
|
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, debug_);
|
||||||
|
|
||||||
OPTION(global_scope_t, full_help); // -H
|
OPTION(global_scope_t, full_help); // -H
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue