diff options
| author | Lily <[email protected]> | 2026-07-28 16:12:21 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-28 16:12:21 +1000 |
| commit | c11e17573334dfb487a8e1cc25fa84fa9e138f5c (patch) | |
| tree | e91dbd19b524f9432da6bcb86b1fc193e0d02e26 /src/commands/dir.js | |
| parent | 6a2f098e72e71437154ec00506e8e736aa8e1026 (diff) | |
| download | bnu-c11e17573334dfb487a8e1cc25fa84fa9e138f5c.tar.gz bnu-c11e17573334dfb487a8e1cc25fa84fa9e138f5c.zip | |
Refactor coreutils into single-call command modules (#1)
* Refactor to single call
Diffstat (limited to 'src/commands/dir.js')
| -rw-r--r-- | src/commands/dir.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/commands/dir.js b/src/commands/dir.js new file mode 100644 index 0000000..408772c --- /dev/null +++ b/src/commands/dir.js @@ -0,0 +1,13 @@ +#!/usr/bin/env bun + +import { lsCmd, lsMetaOption } from "../shared/listing.js"; +import { defineCommand, runAsMain } from "../shared/command.js"; + +export async function dirCmd(args) { + return lsCmd(["-C", "--quoting-style=escape", ...args]); +} + +const singleCall = defineCommand("dir", dirCmd, lsMetaOption); +export default singleCall; + +if (import.meta.main) await runAsMain(singleCall); |
