- Added debug.parser=3 support to ::expandAlias.
This commit is contained in:
Paul Beckingham 2014-10-31 19:51:39 -04:00
parent 131b08f191
commit 86ff5a204f

View file

@ -537,6 +537,7 @@ void CLI::addArg (const std::string& arg)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void CLI::aliasExpansion () void CLI::aliasExpansion ()
{ {
bool changes = false;
bool action; bool action;
int counter = 0; int counter = 0;
do do
@ -571,6 +572,7 @@ void CLI::aliasExpansion ()
} }
action = true; action = true;
changes = true;
} }
else else
reconstructed.push_back (*i); reconstructed.push_back (*i);
@ -582,6 +584,10 @@ void CLI::aliasExpansion ()
_args = reconstructed; _args = reconstructed;
} }
while (action && counter++ < safetyValveDefault); while (action && counter++ < safetyValveDefault);
if (changes &&
context.config.getInteger ("debug.parser") >= 3)
context.debug (context.cli.dump ("CLI::analyze aliasExpansion"));
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////