Processed review comments

This commit is contained in:
Master-Guy 2022-03-17 13:17:43 +01:00
parent 26df6fd39c
commit 59ec6213b9
2 changed files with 5 additions and 5 deletions

@ -295,17 +295,17 @@ export const HelpTexts: IMap<string[]> = {
" ",
],
ls: [
"Usage: ls [dir] [--grep pattern] | [-l]",
"Usage: ls [dir] [-l] [--grep pattern]",
" ",
"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. ",
"The files will be displayed in alphabetical order. ",
" ",
"The 'dir' optional parameter can be used to display files/directories in another directory.",
" ",
"The '--grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.",
" ",
"The '-l' optional parameter allows you to force each item onto a single line.",
" ",
"The '--grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.",
" ",
"Examples:",
" ",
"List all files with the '.script' extension in the current directory:",

@ -20,9 +20,9 @@ export function ls(
let flags;
try {
flags = libarg({
'-l': Boolean,
'--grep': String,
'-g': '--grep',
'-l': Boolean,
},
{ argv: args }
)
@ -35,7 +35,7 @@ export function ls(
const numArgs = args.length;
function incorrectUsage(): void {
terminal.error("Incorrect usage of ls command. Usage: ls [dir] [-g, --grep pattern]");
terminal.error("Incorrect usage of ls command. Usage: ls [dir] [-l] [-g, --grep pattern]");
}
if (numArgs > 4) {