- Fixed bug #1031, which kept expanding aliases after the '--' operator (thanks
  to Jim B).
- Cleaned up mess in the ChangeLog, which should list features before bugs,
  reported issues before ad hoc issues, and in ascending numerical order.
This commit is contained in:
Paul Beckingham 2012-09-26 23:06:42 -04:00
parent 9fb15b0d7d
commit 61ccccabd8
4 changed files with 97 additions and 16 deletions

View file

@ -384,6 +384,10 @@ void A3::resolve_aliases ()
std::vector <Arg>::iterator arg;
for (arg = this->begin (); arg != this->end (); ++arg)
{
// The -- operator stops alias expansion.
if (arg->_raw == "--")
break;
std::map <std::string, std::string>::iterator match =
context.aliases.find (arg->_raw);
@ -408,6 +412,10 @@ void A3::resolve_aliases ()
expanded.push_back (arg->_raw);
}
// Copy any residual tokens.
for (; arg != this->end (); ++arg)
expanded.push_back (arg->_raw);
// Only overwrite if something happened.
if (something)
{