From 408b819c6e087593ba61e82b91dda2369ef32f62 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Feb 2009 21:18:37 -0400 Subject: Greatly simplified the way option and command handlers are defined. --- src/main.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main.cc') diff --git a/src/main.cc b/src/main.cc index c8192082..72d84421 100644 --- a/src/main.cc +++ b/src/main.cc @@ -90,14 +90,13 @@ int main(int argc, char * argv[], char * envp[]) args = read_command_arguments(bound_scope, args); - if (! global_scope->script_file.empty() && - exists(global_scope->script_file)) { + if (global_scope->HANDLED(script_)) { // Ledger is being invoked as a script command interpreter global_scope->read_journal_files(); status = 0; - ifstream in(global_scope->script_file); + ifstream in(global_scope->HANDLER(script_).str()); while (status == 0 && ! in.eof()) { char line[1024]; in.getline(line, 1023); -- cgit v1.2.3