Skip to content

Commit

Permalink
Improve examples for the --passthrough-arguments parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-monteiro authored and senti-mark-monteiro committed May 27, 2024
1 parent c700980 commit 1d93ecc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,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
11 changes: 7 additions & 4 deletions bin/epilogue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,18 @@ 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",

Check failure on line 74 in bin/epilogue.ts

View workflow job for this annotation

GitHub Actions / Check

Insert `⏎···········`
example: ['$ $0 -P "echo {*}" -- foo bar', '# Results in: echo \'foo bar\''].join('\n'),

Check failure on line 75 in bin/epilogue.ts

View workflow job for this annotation

GitHub Actions / Check

Replace `'#·Results·in:·echo·\'foo·bar\''` with `"#·Results·in:·echo·'foo·bar'"`
},
];

Expand Down

0 comments on commit 1d93ecc

Please sign in to comment.