Change the command parser and resolver to be able to disambiguate commands

that are a prefix of another command. Fixes "terrain load"
Fixes Mantis #3123
0.6.3-post-fixes
Melanie Thielker 2009-02-10 14:39:04 +00:00
parent 97bc64d8e5
commit 87f328bd30
1 changed files with 12 additions and 0 deletions

View File

@ -238,6 +238,12 @@ namespace OpenSim.Framework.Console
foreach (string opt in current.Keys) foreach (string opt in current.Keys)
{ {
if (remaining > 0 && opt == s)
{
found.Clear();
found.Add(opt);
break;
}
if (opt.StartsWith(s)) if (opt.StartsWith(s))
{ {
found.Add(opt); found.Add(opt);
@ -301,6 +307,12 @@ namespace OpenSim.Framework.Console
foreach (string opt in current.Keys) foreach (string opt in current.Keys)
{ {
if (opt == s)
{
found.Clear();
found.Add(opt);
break;
}
if (opt.StartsWith(s)) if (opt.StartsWith(s))
{ {
found.Add(opt); found.Add(opt);