aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Main/Terminal/Commands/Help.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Main/Terminal/Commands/Help.cs')
-rw-r--r--ShiftOS.Main/Terminal/Commands/Help.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/ShiftOS.Main/Terminal/Commands/Help.cs b/ShiftOS.Main/Terminal/Commands/Help.cs
index 9067551..b252318 100644
--- a/ShiftOS.Main/Terminal/Commands/Help.cs
+++ b/ShiftOS.Main/Terminal/Commands/Help.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -11,7 +12,7 @@ namespace ShiftOS.Main.Terminal.Commands
public override string Name { get; } = "help";
public override string Summary { get; } = "Shows the list of valid commands.";
public override string Usage { get; } = "help <command>";
- public override bool Unlocked { get; set; } = false;
+ public override bool Unlocked { get; set; } = true;
public override void Run(params string[] args)
{
@@ -22,16 +23,17 @@ namespace ShiftOS.Main.Terminal.Commands
bool solved = false;
foreach (var t in TerminalBackend.instances)
{
- if (t.Name == args[0])
+ if (t.Name.ToLower() == args[0].ToLower())
{
solved = true;
WriteLine($"{t.Name}: {t.Summary} \n usage: {t.Usage}");
break;
}
+ if (t.Name.ToLower() == args[0].ToLower() && t.Unlocked == false) return;
}
if (!solved)
{
- WriteLine($"sbash: invalid token: {args[0]}");
+ Write($"sbash: unexpected token: {args[0]}", Color.White);
}
}
}