Skip to content

Commit

Permalink
Improve examples for the --passthrough-arguments parameter (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-monteiro committed Jun 5, 2024
1 parent 04b7d4a commit 3dc909a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,17 @@ Examples:
- Passthrough some additional arguments via '{<number>}' placeholder
$ concurrently -P "echo {1}" -- foo
# Results in: echo foo
- Passthrough all additional arguments via '{@}' placeholder
$ concurrently -P "npm:dev-* -- {@}" -- --watch --noEmit
# Results in something like: npm run dev-example -- --watch --noEmit
- Passthrough all additional arguments combined via '{*}' placeholder
- Passthrough all additional arguments combined into one argument via '{*}' placeholder
$ concurrently -P "npm:dev-* -- {*}" -- --watch --noEmit
$ concurrently -P "echo {*}" -- foo bar
# Results in: echo 'foo bar'
For more details, visit https://github.com/open-cli-tools/concurrently
```
Expand Down
12 changes: 8 additions & 4 deletions bin/epilogue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,19 @@ const examples = [
},
{
description: "Passthrough some additional arguments via '{<number>}' placeholder",
example: '$ $0 -P "echo {1}" -- foo',
example: ['$ $0 -P "echo {1}" -- foo bar', '# Results in: echo foo'].join('\n'),
},
{
description: "Passthrough all additional arguments via '{@}' placeholder",
example: '$ $0 -P "npm:dev-* -- {@}" -- --watch --noEmit',
example: [
'$ $0 -P "npm:dev-* -- {@}" -- --watch --noEmit',
'# Results in something like: npm run dev-example -- --watch --noEmit',
].join('\n'),
},
{
description: "Passthrough all additional arguments combined via '{*}' placeholder",
example: '$ $0 -P "npm:dev-* -- {*}" -- --watch --noEmit',
description:
"Passthrough all additional arguments combined into one argument via '{*}' placeholder",
example: ['$ $0 -P "echo {*}" -- foo bar', "# Results in: echo 'foo bar'"].join('\n'),
},
];

Expand Down

0 comments on commit 3dc909a

Please sign in to comment.