From ba63472068bca5ec279a820622e23ad63ed78007 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 16 Jun 2015 21:15:34 -0400 Subject: [PATCH] CLI2: Added ::getCommandRaw - Used when the canonicalized form is not wanted - just the raw. --- src/CLI2.cpp | 10 ++++++++++ src/CLI2.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index fbfbfde77..ef64e8245 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -762,6 +762,16 @@ std::string CLI2::getCommand () const return ""; } +//////////////////////////////////////////////////////////////////////////////// +std::string CLI2::getCommandRaw () const +{ + for (auto& a : _args) + if (a.hasTag ("CMD")) + return a.attribute ("raw"); + + return ""; +} + /* //////////////////////////////////////////////////////////////////////////////// std::string CLI2::getLimit () const diff --git a/src/CLI2.h b/src/CLI2.h index eb7b62fa1..985e4323e 100644 --- a/src/CLI2.h +++ b/src/CLI2.h @@ -98,6 +98,7 @@ public: bool canonicalize (std::string&, const std::string&, const std::string&) const; std::string getBinary () const; std::string getCommand () const; + std::string getCommandRaw () const; /* std::string getLimit () const; */