Allow entry of '?' in http URIs. If the field being typed begins with
"http", the ? is just an ordinary character in that field.GenericGridServerConcept
parent
1cadad9ec6
commit
aaf8b07ecf
|
@ -799,16 +799,25 @@ namespace OpenSim.Framework.Console
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ContextHelp()
|
private bool ContextHelp()
|
||||||
{
|
{
|
||||||
string[] words = Parser.Parse(cmdline.ToString());
|
string[] words = Parser.Parse(cmdline.ToString());
|
||||||
|
|
||||||
string[] opts = Commands.FindNextOption(words, cmdline.ToString().EndsWith(" "));
|
bool trailingSpace = cmdline.ToString().EndsWith(" ");
|
||||||
|
|
||||||
|
// Allow ? through while typing a URI
|
||||||
|
//
|
||||||
|
if (words.Length > 0 && words[words.Length-1].StartsWith("http") && !trailingSpace)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
string[] opts = Commands.FindNextOption(words, trailingSpace);
|
||||||
|
|
||||||
if (opts[0].StartsWith("Command help:"))
|
if (opts[0].StartsWith("Command help:"))
|
||||||
Output(opts[0]);
|
Output(opts[0]);
|
||||||
else
|
else
|
||||||
Output(String.Format("Options: {0}", String.Join(" ", opts)));
|
Output(String.Format("Options: {0}", String.Join(" ", opts)));
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Prompt()
|
public void Prompt()
|
||||||
|
@ -923,7 +932,7 @@ namespace OpenSim.Framework.Console
|
||||||
|
|
||||||
if (c == '?' && isCommand)
|
if (c == '?' && isCommand)
|
||||||
{
|
{
|
||||||
ContextHelp();
|
if (ContextHelp())
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue