feat: support pass all args syntax

This commit is contained in:
Simon Lecoq
2023-11-08 05:51:34 +00:00
committed by GitHub
parent 5a5795cfe2
commit 01d2a38824
3 changed files with 23 additions and 0 deletions

5
mod.ts
View File

@@ -449,6 +449,11 @@ export function command(
) => [key, options.default]),
),
})
if (parseArgv) {
raw = raw.replaceAll("$<*>", argv.join(" "))
} else if (colors) {
raw = raw.replaceAll("$<*>", italic(underline("$<*>")))
}
for (let i = 0; i < args.length; i++) {
const { alias, required, default: defaults } = args[i]
if (parseArgv) {