summaryrefslogtreecommitdiff
path: root/src/global.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-06 23:39:04 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-06 23:39:04 -0400
commit1b9e7fa7be4b65dfe9c07f3ca25c2fceb23195aa (patch)
treefc25355f81260b4da967cff253c702bda85b0a74 /src/global.cc
parentfdc8e401bf9f342c42cef52eeb5b5e566ac09197 (diff)
downloadfork-ledger-1b9e7fa7be4b65dfe9c07f3ca25c2fceb23195aa.tar.gz
fork-ledger-1b9e7fa7be4b65dfe9c07f3ca25c2fceb23195aa.tar.bz2
fork-ledger-1b9e7fa7be4b65dfe9c07f3ca25c2fceb23195aa.zip
When in the REPL, consider each new command a new "command-line".
Diffstat (limited to 'src/global.cc')
-rw-r--r--src/global.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/global.cc b/src/global.cc
index 9dc4c647..14fb3c29 100644
--- a/src/global.cc
+++ b/src/global.cc
@@ -145,13 +145,15 @@ void global_scope_t::report_error(const std::exception& err)
void global_scope_t::execute_command(strings_list args, bool at_repl)
{
+ session().now_at_command_line(true);
+
// Process the command verb, arguments and options
args = read_command_arguments(report(), args);
if (args.empty())
return;
strings_list::iterator arg = args.begin();
- string verb = *arg++;
+ string verb = *arg++;
// Look for a precommand first, which is defined as any defined function
// whose name starts with "ledger_precmd_". The difference between a