diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2025-08-16 10:15:19 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2025-08-16 10:50:04 +0200 |
commit | 754a74da6052c9f5e8dc4a536c58ccc11cb66369 (patch) | |
tree | 31974820504abea4efa453115f1771eb3b02e2df /src | |
parent | c48d374e1070c264325f40645eda7117bd774bed (diff) |
Add /? flag handling for more commands.
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/help.zig | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/src/cmd/help.zig b/src/cmd/help.zig index e5cdad3..4c91464 100644 --- a/src/cmd/help.zig +++ b/src/cmd/help.zig @@ -199,6 +199,116 @@ fn getCommandSpecificHelp(command: []const u8) []const u8 { \\ /? Display this help message \\ ; + } else if (std.mem.eql(u8, command, "MD") or std.mem.eql(u8, command, "MKDIR")) { + return + \\MD/MKDIR - Create directory + \\ + \\Syntax: MD directory [/flags] + \\ MKDIR directory [/flags] + \\ + \\ directory Directory path to create + \\ + \\Flags: + \\ /? Display this help message + \\ + \\Example: MD C:\TEMP + \\Note: Creates intermediate directories if needed + \\ + ; + } else if (std.mem.eql(u8, command, "RD") or std.mem.eql(u8, command, "RMDIR")) { + return + \\RD/RMDIR - Remove directory + \\ + \\Syntax: RD directory [/flags] + \\ RMDIR directory [/flags] + \\ + \\ directory Directory path to remove + \\ + \\Flags: + \\ /? Display this help message + \\ + \\Example: RD C:\TEMP + \\Note: Directory must be empty + \\ + ; + } else if (std.mem.eql(u8, command, "REN") or std.mem.eql(u8, command, "RENAME")) { + return + \\REN/RENAME - Rename files or directories + \\ + \\Syntax: REN oldname newname [/flags] + \\ RENAME oldname newname [/flags] + \\ + \\ oldname Current name of file or directory + \\ newname New name for file or directory + \\ + \\Flags: + \\ /? Display this help message + \\ + \\Example: REN file1.txt file2.txt + \\ + ; + } else if (std.mem.eql(u8, command, "MOVE")) { + return + \\MOVE - Move files or directories + \\ + \\Syntax: MOVE source destination [/flags] + \\ + \\ source Source file or directory + \\ destination Destination path + \\ + \\Flags: + \\ /? Display this help message + \\ + \\Example: MOVE file1.txt C:\TEMP\file1.txt + \\Note: MOVE command is currently a placeholder + \\ + ; + } else if (std.mem.eql(u8, command, "PATH")) { + return + \\PATH - Display or set PATH environment variable + \\ + \\Syntax: PATH [/flags] + \\ PATH newpath [/flags] + \\ PATH=newpath + \\ + \\ newpath New PATH value to set + \\ + \\Flags: + \\ /? Display this help message + \\ + \\Example: PATH C:\DOS;C:\UTILS + \\Note: Without arguments, displays current PATH + \\ + ; + } else if (std.mem.eql(u8, command, "SORT")) { + return + \\SORT - Sort input lines alphabetically + \\ + \\Syntax: SORT [/flags] + \\ + \\Flags: + \\ /? Display this help message + \\ + \\Example: TYPE file.txt | SORT + \\Note: Reads from standard input and sorts lines + \\ + ; + } else if (std.mem.eql(u8, command, "DEL") or std.mem.eql(u8, command, "ERASE")) { + return + \\DEL/ERASE - Delete files + \\ + \\Syntax: DEL filename [/flags] + \\ ERASE filename [/flags] + \\ + \\ filename File to delete + \\ + \\Flags: + \\ /? Display this help message + \\ + \\Example: DEL temp.txt + \\Note: Wildcard deletion not yet implemented + \\ + ; } else { return \\Unknown command. Type HELP for a list of commands. |