From 759789bc45539e2e526deea5a705efc167f135d9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 24 Sep 2015 02:07:30 +0100 Subject: change console main help to match master --- OpenSim/Framework/Console/CommandConsole.cs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index d908b68..6b7cdf8 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -83,8 +83,8 @@ namespace OpenSim.Framework.Console = "To enter an argument that contains spaces, surround the argument with double quotes.\nFor example, show object name \"My long object name\"\n"; public const string ItemHelpText -= @"For more information, type 'help ' to get a list of all commands, - or type help ' where is one of the following:"; + = @"For more information, type 'help all' to get a list of all commands, + or type help ' where is one of the following:"; /// /// Commands organized by keyword in a tree @@ -116,15 +116,13 @@ namespace OpenSim.Framework.Console if (helpParts.Count == 0) { help.Add(GeneralHelpText); - help.AddRange(CollectAllCommandsHelp()); - } - else if (helpParts.Count == 1 && helpParts[0] == "categories") - { - help.Add(""); // Will become a newline. - help.Add(GeneralHelpText); help.Add(ItemHelpText); help.AddRange(CollectModulesHelp(tree)); } + else if (helpParts.Count == 1 && helpParts[0] == "all") + { + help.AddRange(CollectAllCommandsHelp()); + } else { help.AddRange(CollectHelp(helpParts)); @@ -147,11 +145,8 @@ namespace OpenSim.Framework.Console { foreach (List commands in m_modulesCommands.Values) { - foreach (CommandInfo c in commands) - { - if (c.long_help != String.Empty) - help.Add(string.Format("{0} - {1}", c.help_text, c.long_help)); - } + var ourHelpText = commands.ConvertAll(c => string.Format("{0} - {1}", c.help_text, c.long_help)); + help.AddRange(ourHelpText); } } -- cgit v1.1