How to pass arguments to shebang recipes #2740
-
|
Is there a way to pass arguments to shebang recipes? For example: test_deno:
#!/usr/bin/env -S deno run
console.log(Deno.args[0]) |
Beta Was this translation helpful? Give feedback.
Answered by
laniakea64
May 20, 2025
Replies: 1 comment 1 reply
-
|
Recipe parameters work with shebang recipes too: https://just.systems/man/en/recipe-parameters.html If you specifically want to use the shebang recipe interpreter's facility for accessing arguments, you can use (the recipe parameter does not necessarily need to be the variadic |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
char8x
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Recipe parameters work with shebang recipes too: https://just.systems/man/en/recipe-parameters.html
If you specifically want to use the shebang recipe interpreter's facility for accessing arguments, you can use
positional-arguments:(the recipe parameter does not necessarily need to be the variadic
*args, it will work with any set of recipe parameters you specify)