We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c2dcfa commit 248f9deCopy full SHA for 248f9de
1 file changed
implement-shell-tools/ls/ls.mjs
@@ -14,26 +14,12 @@ const path = program.args[0] || ".";
14
const options = program.opts();
15
try {
16
const files = await fs.readdir(path);
17
- if (options.onePerLine && options.a) {
18
- for (const file of files) {
19
- console.log(file);
20
- }
21
- } else if (options.onePerLine) {
22
23
- if (!file.startsWith(".")) {
24
25
26
27
- } else if (options.a) {
28
29
- process.stdout.write(file + " ");
30
31
- } else {
32
33
34
35
36
+
+ for(const file of files)
+ {
+ if(!options.a && file.startsWith("."))continue;
+ console.log(file);
37
}
38
} catch (error) {
39
console.error(error.message);
0 commit comments