Skip to content

Commit

Permalink
add - Added helper for quick reference to configs
Browse files Browse the repository at this point in the history
---

We've added help helpers for quick reference to configurations that are installed to the kernel configuration manager. This is necessary to allow quick access when referring to "help".

---

Type: add
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 23, 2024
1 parent d891fa8 commit 7c284c1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions public/Nitrocid/Shell/Shells/UESH/Commands/GetConfigValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,11 @@ public override int Execute(CommandParameters parameters, ref string variableVal
return 0;
}

public override void HelpHelper()
{
var names = Config.GetKernelConfigs().Select((bkc) => bkc.GetType().Name).ToArray();
TextWriters.WriteListEntry(Translate.DoTranslation("Available configuration types"), string.Join(", ", names), KernelColorType.ListEntry, KernelColorType.ListValue);
}

}
}
6 changes: 6 additions & 0 deletions public/Nitrocid/Shell/Shells/UESH/Commands/LsConfigValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,11 @@ public override int Execute(CommandParameters parameters, ref string variableVal
return 0;
}

public override void HelpHelper()
{
var names = Config.GetKernelConfigs().Select((bkc) => bkc.GetType().Name).ToArray();
TextWriters.WriteListEntry(Translate.DoTranslation("Available configuration types"), string.Join(", ", names), KernelColorType.ListEntry, KernelColorType.ListValue);
}

}
}
6 changes: 6 additions & 0 deletions public/Nitrocid/Shell/Shells/UESH/Commands/SetConfigValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,11 @@ public override int Execute(CommandParameters parameters, ref string variableVal
return 0;
}

public override void HelpHelper()
{
var names = Config.GetKernelConfigs().Select((bkc) => bkc.GetType().Name).ToArray();
TextWriters.WriteListEntry(Translate.DoTranslation("Available configuration types"), string.Join(", ", names), KernelColorType.ListEntry, KernelColorType.ListValue);
}

}
}

0 comments on commit 7c284c1

Please sign in to comment.