aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend
diff options
context:
space:
mode:
authorwilliam341 <[email protected]>2017-07-28 11:29:08 -0700
committerwilliam341 <[email protected]>2017-07-28 11:29:08 -0700
commitbf62e016fd486063f767d7008c1908050cf1535b (patch)
treeb480e192776facd9752f78102d55cb487c630ce3 /ShiftOS.Frontend
parent43ca601a2426da49bd1e034d5694071ef241cd83 (diff)
downloadshiftos_thereturn-bf62e016fd486063f767d7008c1908050cf1535b.tar.gz
shiftos_thereturn-bf62e016fd486063f767d7008c1908050cf1535b.tar.bz2
shiftos_thereturn-bf62e016fd486063f767d7008c1908050cf1535b.zip
fix programs help
Diffstat (limited to 'ShiftOS.Frontend')
-rw-r--r--ShiftOS.Frontend/Commands.cs21
1 files changed, 13 insertions, 8 deletions
diff --git a/ShiftOS.Frontend/Commands.cs b/ShiftOS.Frontend/Commands.cs
index 1bf2d14..012d0b0 100644
--- a/ShiftOS.Frontend/Commands.cs
+++ b/ShiftOS.Frontend/Commands.cs
@@ -427,17 +427,22 @@ namespace ShiftOS.Frontend
[Command("programs", description = "{DESC_PROGRAMS}")]
public static bool Programs()
{
- Console.WriteLine("{GEN_PROGRAMS}");
- Console.WriteLine("===============");
- Console.WriteLine();
- foreach(var cmd in TerminalBackend.Commands.Where(x=>x is TerminalBackend.WinOpenCommand && Shiftorium.UpgradeInstalled(x.Dependencies)).OrderBy(x => x.CommandInfo.name))
+ var sb = new StringBuilder();
+ sb.AppendLine("{GEN_PROGRAMS}");
+ sb.AppendLine("===============");
+ sb.AppendLine();
+ //print all unique namespaces.
+ foreach(var n in TerminalBackend.Commands.Where(x => x is TerminalBackend.WinOpenCommand && Shiftorium.UpgradeInstalled(x.Dependencies)).OrderBy(x => x.CommandInfo.name))
{
- Console.Write(" - " + cmd.CommandInfo.name);
- if (!string.IsNullOrWhiteSpace(cmd.CommandInfo.description))
+ sb.Append(" - " + n.CommandInfo.name);
+ if (!string.IsNullOrWhiteSpace(n.CommandInfo.description))
if (Shiftorium.UpgradeInstalled("help_description"))
- Console.Write(": " + cmd.CommandInfo.description);
- Console.WriteLine();
+ sb.Append(" - " + n.CommandInfo.description);
+ sb.AppendLine();
}
+
+ Console.WriteLine(sb.ToString());
+
return true;
}