Implement command history and advanced line editing
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in 36s
Builds / ExectOS (amd64, debug) (push) Successful in 38s
Builds / ExectOS (i686, release) (push) Successful in 31s
Builds / ExectOS (i686, debug) (push) Successful in 33s

This commit is contained in:
2026-04-20 20:17:08 +02:00
parent a217391338
commit ba41ad8f0b
4 changed files with 284 additions and 31 deletions

View File

@@ -255,6 +255,9 @@ class Shell
{
private:
STATIC BOOLEAN ExitRequest;
STATIC WCHAR History[XTBL_SH_HISTORY_ENTRIES][XTBL_SH_MAX_LINE_LENGTH];
STATIC ULONG HistoryCount;
STATIC ULONG HistoryIndex;
STATIC LIST_ENTRY ShellCommands;
public:
@@ -280,6 +283,10 @@ class Shell
OUT PULONG Argc,
OUT PWCHAR **Argv);
STATIC XTCDECL VOID PrintPrompt();
STATIC XTCDECL VOID PrintPromptLine(IN PWCHAR Buffer,
IN ULONG BufferLength,
IN ULONG CursorPosition,
IN ULONG PreviousBufferLength);
STATIC XTCDECL VOID ReadCommand(OUT PWCHAR Buffer,
IN ULONG BufferSize);
STATIC XTCDECL VOID RegisterBuiltinCommands();