Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve examples for the --passthrough-arguments parameter #480

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading