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

Question: How to forward *args? #1988

Open
gabyx opened this issue Apr 3, 2024 · 2 comments
Open

Question: How to forward *args? #1988

gabyx opened this issue Apr 3, 2024 · 2 comments

Comments

@gabyx
Copy link

gabyx commented Apr 3, 2024

When I have

run *args:
   echo "$1, $2,..."

do *args: (run args)

How can I forward arguments properly such that $2 is b in just do a b c?

@casey
Copy link
Owner

casey commented May 15, 2024

Unfortunately this currently isn't possible. args will be passed to run as a single space-separated argument.

The best way to support this would by some kind of splat syntax:

run *args:
   echo "$1, $2,..."

do *args: (run *args)

@casey casey closed this as completed May 15, 2024
@casey
Copy link
Owner

casey commented May 15, 2024

Whoops, didn't mean to close.

@casey casey reopened this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants