mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
Processed review comments
This commit is contained in:
parent
26df6fd39c
commit
59ec6213b9
@ -295,17 +295,17 @@ export const HelpTexts: IMap<string[]> = {
|
|||||||
" ",
|
" ",
|
||||||
],
|
],
|
||||||
ls: [
|
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 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 files will be displayed in alphabetical order. ",
|
||||||
" ",
|
" ",
|
||||||
"The 'dir' optional parameter can be used to display files/directories in another directory.",
|
"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 '-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:",
|
"Examples:",
|
||||||
" ",
|
" ",
|
||||||
"List all files with the '.script' extension in the current directory:",
|
"List all files with the '.script' extension in the current directory:",
|
||||||
|
@ -20,9 +20,9 @@ export function ls(
|
|||||||
let flags;
|
let flags;
|
||||||
try {
|
try {
|
||||||
flags = libarg({
|
flags = libarg({
|
||||||
|
'-l': Boolean,
|
||||||
'--grep': String,
|
'--grep': String,
|
||||||
'-g': '--grep',
|
'-g': '--grep',
|
||||||
'-l': Boolean,
|
|
||||||
},
|
},
|
||||||
{ argv: args }
|
{ argv: args }
|
||||||
)
|
)
|
||||||
@ -35,7 +35,7 @@ export function ls(
|
|||||||
|
|
||||||
const numArgs = args.length;
|
const numArgs = args.length;
|
||||||
function incorrectUsage(): void {
|
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) {
|
if (numArgs > 4) {
|
||||||
|
Loading…
Reference in New Issue
Block a user