From f8854f0e4477f87ef68649e769b8126e7586865a Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 29 Jul 2017 11:01:32 -0400 Subject: subshells and shell-specific cmds --- ShiftOS.Frontend/Commands.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'ShiftOS.Frontend/Commands.cs') diff --git a/ShiftOS.Frontend/Commands.cs b/ShiftOS.Frontend/Commands.cs index 012d0b0..d21e8a9 100644 --- a/ShiftOS.Frontend/Commands.cs +++ b/ShiftOS.Frontend/Commands.cs @@ -152,7 +152,8 @@ namespace ShiftOS.Frontend } } - [Command("commands", "", "{DESC_COMMANDS}")] + [MetaCommand] + [Command("help", "", "{DESC_COMMANDS}")] public static bool Commands() { var sb = new StringBuilder(); @@ -160,7 +161,7 @@ namespace ShiftOS.Frontend sb.AppendLine("================="); sb.AppendLine(); //print all unique namespaces. - foreach (var n in TerminalBackend.Commands.Where(x => !(x is TerminalBackend.WinOpenCommand) && Shiftorium.UpgradeInstalled(x.Dependencies) && x.CommandInfo.hide == false).OrderBy(x => x.CommandInfo.name)) + foreach (var n in TerminalBackend.Commands.Where(x => !(x is TerminalBackend.WinOpenCommand) && Shiftorium.UpgradeInstalled(x.Dependencies) && x.CommandInfo.hide == false && x.MatchShell() == true).OrderBy(x => x.CommandInfo.name)) { sb.Append(" - " + n.CommandInfo.name); if (!string.IsNullOrWhiteSpace(n.CommandInfo.description)) @@ -174,13 +175,6 @@ namespace ShiftOS.Frontend return true; } - [Command("help", description = "{DESC_HELP}")] - public static bool Help() - { - Commands(); - WindowCommands.Programs(); - return true; - } [MultiplayerOnly] -- cgit v1.2.3