CLI2: Modified ::getWords to ignore either raw or canonicalized command

This commit is contained in:
Paul Beckingham 2015-06-16 21:17:19 -04:00
parent ba63472068
commit bb283de1dd

View file

@ -684,12 +684,14 @@ const std::vector <std::string> CLI2::getWords ()
{ {
auto binary = getBinary (); auto binary = getBinary ();
auto command = getCommand (); auto command = getCommand ();
auto commandRaw = getCommandRaw ();
std::vector <std::string> words; std::vector <std::string> words;
for (auto& a : _original_args) for (auto& a : _original_args)
{ {
if (a != binary && if (a != binary &&
a != command && a != command &&
a != commandRaw &&
a != "--" && a != "--" &&
a.find ("rc:") != 0 && a.find ("rc:") != 0 &&
a.find ("rc.") != 0) a.find ("rc.") != 0)