diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-22 16:27:24 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-22 16:27:24 -0400 |
commit | 0b9f22b4d24e8fa545af2d7d448ddfe9fb3736ba (patch) | |
tree | 61bb92dac4a3adc07e6b61a4b7516252fc6abbe1 /src/session.h | |
parent | ccedf7d57f6cc42553f1d80189bf1491df6680e2 (diff) | |
download | fork-ledger-0b9f22b4d24e8fa545af2d7d448ddfe9fb3736ba.tar.gz fork-ledger-0b9f22b4d24e8fa545af2d7d448ddfe9fb3736ba.tar.bz2 fork-ledger-0b9f22b4d24e8fa545af2d7d448ddfe9fb3736ba.zip |
Redid the way command-line arguments are processed. Before, Ledger used - and
-- to mean special things after the command verb was seen. But now, what used
to be specified as this:
ledger -n reg cash -payable -- shell
Is now specified as this:
ledger reg -n cash not payable @shell
It could also be specified as:
ledger -n reg \(cash and not payable\) and @shell
Diffstat (limited to 'src/session.h')
-rw-r--r-- | src/session.h | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/src/session.h b/src/session.h index bef9b580..a0637b2e 100644 --- a/src/session.h +++ b/src/session.h @@ -224,27 +224,12 @@ See LICENSE file included with the distribution for details and disclaimer.\n"; // Option handlers // - value_t option_file_(call_scope_t& args) { + value_t option_file_(call_scope_t& args) { // f assert(args.size() == 1); - // jww (2008-08-13): Add support for multiple files, but not between - // -f and LEDGER_FILE - if (data_file.empty()) { - data_file = args[0].as_string(); - use_cache = false; - -#if 0 - // jww (2008-08-14): Should we check whether the file exists - // before we accept it, or is this done later on? - if (! data_file.string() == "-") { - std::string path = resolve_path(optarg); - if (access(path.c_str(), R_OK) != -1) - config->data_file = path; - else - throw_(std::invalid_argument, - "The ledger file '" << path << "' does not exist or is not readable"); - } -#endif - } + + // jww (2008-08-13): Add support for multiple files + data_file = args[0].as_string(); + use_cache = false; return true; } |