diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-16 16:57:32 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-16 16:57:32 -0400 |
commit | 5e1870e259e866f3720bddbf757dec0c781cc967 (patch) | |
tree | 34d70e9172890a956a332831537da773a2442f15 /src/global.cc | |
parent | d0a664d102bb0886dbaf844b6857749f70702ea3 (diff) | |
download | fork-ledger-5e1870e259e866f3720bddbf757dec0c781cc967.tar.gz fork-ledger-5e1870e259e866f3720bddbf757dec0c781cc967.tar.bz2 fork-ledger-5e1870e259e866f3720bddbf757dec0c781cc967.zip |
Added --args-only flags, to ignore init and env
Diffstat (limited to 'src/global.cc')
-rw-r--r-- | src/global.cc | 13 |
1 files changed, 9 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; |