Enhancement

- When presenting lists of ambiguous command, attributes and modifiers
  to the user, it is now a sorted list.
This commit is contained in:
Paul Beckingham 2010-07-28 17:47:58 -04:00
parent 96bd3ff8db
commit e886f7635b
3 changed files with 14 additions and 6 deletions

View file

@ -25,6 +25,7 @@
//
////////////////////////////////////////////////////////////////////////////////
#include <algorithm>
#include <sstream>
#include <stdlib.h>
#include <string.h>
@ -253,6 +254,7 @@ bool Att::validNameValue (
{
std::string error = "Ambiguous attribute '" + name + "' - could be either of "; // TODO i18n
std::sort (matches.begin (), matches.end ());
std::string combined;
join (combined, ", ", matches);
@ -278,6 +280,7 @@ bool Att::validNameValue (
{
std::string error = "Ambiguous modifier '" + mod + "' - could be either of "; // TODO i18n
std::sort (matches.begin (), matches.end ());
std::string combined;
join (combined, ", ", matches);
error += combined;