From a22b12ecd4c8e65ae08053f0441e345750c60773 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 22 Aug 2009 20:18:24 +0100 Subject: [PATCH] Change prompt handling in console. No user changes --- OpenSim/Framework/Console/CommandConsole.cs | 4 ++-- OpenSim/Framework/Console/ConsoleBase.cs | 4 ++-- OpenSim/Framework/Console/RemoteConsole.cs | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 3387013f5e..06136ffb7b 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -576,7 +576,7 @@ namespace OpenSim.Framework.Console public void Prompt() { - string line = ReadLine(m_defaultPrompt, true, true); + string line = ReadLine(m_defaultPrompt + "# ", true, true); if (line != String.Empty) { @@ -592,7 +592,7 @@ namespace OpenSim.Framework.Console public override string ReadLine(string p, bool isCommand, bool e) { - System.Console.Write("{0}", prompt); + System.Console.Write("{0}", p); string cmdinput = System.Console.ReadLine(); if (isCommand) diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 5e258ae44b..0a51266064 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -48,7 +48,7 @@ namespace OpenSim.Framework.Console /// public string DefaultPrompt { - set { m_defaultPrompt = value + "# "; } + set { m_defaultPrompt = value; } get { return m_defaultPrompt; } } protected string m_defaultPrompt; @@ -123,7 +123,7 @@ namespace OpenSim.Framework.Console public virtual string ReadLine(string p, bool isCommand, bool e) { - System.Console.Write("{0}", prompt); + System.Console.Write("{0}", p); string cmdinput = System.Console.ReadLine(); return cmdinput; diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs index da8556a2d1..1810614409 100644 --- a/OpenSim/Framework/Console/RemoteConsole.cs +++ b/OpenSim/Framework/Console/RemoteConsole.cs @@ -217,6 +217,12 @@ namespace OpenSim.Framework.Console id.AppendChild(xmldoc.CreateTextNode(sessionID.ToString())); rootElement.AppendChild(id); + + XmlElement prompt = xmldoc.CreateElement("", "Prompt", ""); + prompt.AppendChild(xmldoc.CreateTextNode(DefaultPrompt)); + + rootElement.AppendChild(prompt); + rootElement.AppendChild(MainConsole.Instance.Commands.GetXml(xmldoc)); reply["str_response_string"] = xmldoc.InnerXml;