Skip to content

Commit

Permalink
Merge branch 'main' into add-promptSelect()-ETX-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored Dec 16, 2024
2 parents ca35900 + 3698cbd commit 3c45ab0
Show file tree
Hide file tree
Showing 16 changed files with 939 additions and 27 deletions.
1 change: 1 addition & 0 deletions _tools/node_test_runner/run_test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import "../../collections/union_test.ts";
import "../../collections/unzip_test.ts";
import "../../collections/without_all_test.ts";
import "../../collections/zip_test.ts";
import "../../fs/unstable_stat_test.ts";

for (const testDef of testDefinitions) {
test(testDef.name, testDef.fn);
Expand Down
18 changes: 11 additions & 7 deletions cli/parse_args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* Command line arguments parser based on
* {@link https://github.com/minimistjs/minimist | minimist}.
*
* @example
* @example Usage
* ```ts
* import { parseArgs } from "@std/cli/parse-args";
*
* console.dir(parseArgs(Deno.args));
* const args = parseArgs(Deno.args);
* ```
*
* @module
Expand Down Expand Up @@ -278,14 +278,18 @@ export interface ParseOptions<
*
* @default {false}
*
* @example
* @example Double dash option is false
* ```ts
* // $ deno run example.ts -- a arg1
* import { parseArgs } from "@std/cli/parse-args";
* const args = parseArgs(Deno.args, { "--": false }); // args equals { _: [ "a", "arg1" ] }
* ```
*
* @example Double dash option is true
* ```ts
* // $ deno run example.ts -- a arg1
* import { parseArgs } from "@std/cli/parse-args";
* console.dir(parseArgs(Deno.args, { "--": false }));
* // output: { _: [ "a", "arg1" ] }
* console.dir(parseArgs(Deno.args, { "--": true }));
* // output: { _: [], --: [ "a", "arg1" ] }
* const args = parseArgs(Deno.args, { "--": true }); // args equals { _: [], --: [ "a", "arg1" ] }
* ```
*/
"--"?: TDoubleDash;
Expand Down
Loading

0 comments on commit 3c45ab0

Please sign in to comment.