From 749c3fef8ad2d3af97fcd9ab9c72740675e46715 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Mar 2012 01:51:37 +0000 Subject: Change "help" to display categories/module list then "help " to display commands in a category. This is to deal with the hundred lines of command splurge when one previously typed "help" Modelled somewhat on the mysql console One can still type help to get per command help at any point. Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet). Does not affect command parsing or any other aspects of the console apart from the help system. Backwards compatible with existing modules. --- OpenSim/Region/Application/OpenSimBase.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Application/OpenSimBase.cs') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f482d8f..27a58a4 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -242,15 +242,15 @@ namespace OpenSim foreach (string topic in topics) { - m_console.Commands.AddCommand("plugin", false, "help " + topic, + m_console.Commands.AddCommand(topic, false, "help " + topic, "help " + topic, "Get help on plugin command '" + topic + "'", HandleCommanderHelp); - - m_console.Commands.AddCommand("plugin", false, topic, - topic, - "Execute subcommand for plugin '" + topic + "'", - null); +// +// m_console.Commands.AddCommand("General", false, topic, +// topic, +// "Execute subcommand for plugin '" + topic + "'", +// null); ICommander commander = null; -- cgit v1.1 From 650d761c06149b59148e57e90cb47dcfa8d65f6a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Mar 2012 02:17:45 +0000 Subject: Display help commander topics in capitalized form - the commands themselves are still lowercase. Also convert the estate commands to simply AddCommand() calls so that commands from two different modules can be placed in the same category --- OpenSim/Region/Application/OpenSimBase.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Application/OpenSimBase.cs') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 27a58a4..d3c1102 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -242,8 +242,10 @@ namespace OpenSim foreach (string topic in topics) { - m_console.Commands.AddCommand(topic, false, "help " + topic, - "help " + topic, + string capitalizedTopic = char.ToUpper(topic[0]) + topic.Substring(1); + + m_console.Commands.AddCommand(capitalizedTopic, false, "help " + capitalizedTopic, + "help " + capitalizedTopic, "Get help on plugin command '" + topic + "'", HandleCommanderHelp); // @@ -267,7 +269,7 @@ namespace OpenSim foreach (string command in commander.Commands.Keys) { - m_console.Commands.AddCommand(topic, false, + m_console.Commands.AddCommand(capitalizedTopic, false, topic + " " + command, topic + " " + commander.Commands[command].ShortHelp(), String.Empty, HandleCommanderCommand); @@ -286,7 +288,7 @@ namespace OpenSim // Only safe for the interactive console, since it won't // let us come here unless both scene and commander exist // - ICommander moduleCommander = SceneManager.CurrentOrFirstScene.GetCommander(cmd[1]); + ICommander moduleCommander = SceneManager.CurrentOrFirstScene.GetCommander(cmd[1].ToLower()); if (moduleCommander != null) m_console.Output(moduleCommander.Help); } -- cgit v1.1