From 904c42fcbe7d97982349d8887b81f9aec2f8c75f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 25 May 2014 22:45:00 -0400 Subject: [PATCH] Parser - ::getCommand should return the canonical form of the command, not the raw input. --- src/Context.cpp | 1 - src/Parser.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 65d82d605..cbd1238b3 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -385,7 +385,6 @@ int Context::dispatch (std::string &out) if (command != "") { updateXtermTitle (); - updateVerbosity (); Command* c = commands[command]; diff --git a/src/Parser.cpp b/src/Parser.cpp index fe839f203..1beee8a12 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -595,7 +595,7 @@ std::string Parser::getLimit () const for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i) { // Parser override operator. - if ((*i)->attribute ("raw") == "TERMINATED") + if ((*i)->attribute ("raw") == "--") break; if ((*i)->hasTag ("PSEUDO") && @@ -615,11 +615,11 @@ std::string Parser::getCommand () const for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i) { // Parser override operator. - if ((*i)->attribute ("canonical") == "TERMINATED") + if ((*i)->attribute ("raw") == "--") break; if ((*i)->hasTag ("CMD")) - return (*i)->attribute ("raw"); + return (*i)->attribute ("canonical"); } return "";