From 59ec6213b92c5abbf750b715700b77e38f1d425a Mon Sep 17 00:00:00 2001 From: Master-Guy <566429+Master-Guy@users.noreply.github.com> Date: Thu, 17 Mar 2022 13:17:43 +0100 Subject: [PATCH] Processed review comments --- src/Terminal/HelpText.ts | 6 +++--- src/Terminal/commands/ls.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Terminal/HelpText.ts b/src/Terminal/HelpText.ts index 68a2cb90d..2e3bcb728 100644 --- a/src/Terminal/HelpText.ts +++ b/src/Terminal/HelpText.ts @@ -295,17 +295,17 @@ export const HelpTexts: IMap = { " ", ], 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:", diff --git a/src/Terminal/commands/ls.tsx b/src/Terminal/commands/ls.tsx index 84750354e..b47737d12 100644 --- a/src/Terminal/commands/ls.tsx +++ b/src/Terminal/commands/ls.tsx @@ -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) {