-
Notifications
You must be signed in to change notification settings - Fork 55
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
Support infinite positional args #4
Comments
I'll take this one sometime this week. |
I wonder if we can inject multiple environment variables in this case?
Particularly for bash some of the looping and comma-splitting is pretty annoying. |
I was thinking about space separation too since it works better for bash/shells. Though I'm not sure about setting the numbered variables on top of that ( While space separation works great for bash, I'm less sure about other runtimes. We could use spaces Sticking to spaces for all runtimes makes sense and keeps things consistent. I'll put some more thought into how this can go wrong... One scenario i'm thinking of is this:
In bash, i'm pretty sure this would still be an array. But in a runtime like node, you can't just do |
While at it, I think a feature to limit the max number of args can be handy too. The syntax would be something like: ### watch build (files/2 option...)
```sh
watchexec "./script/build $files" --clear $option
``` inspired from Erlang/Elixir docs for function that take N args |
Interesting idea! I won't commit to that syntactical addition in this task, only because I feel like this could easily be done in the script's code if there absolutely needs to be a maximum for some reason. For example, a js script could easily do |
Maybe something like
my cmd (files...)
.Not sure what format to inject the environment variable string as though. Perhaps just comma separated?
name1,name2,name3
mask services start api proxy email # Starting all services: 'api,proxy,email'
The text was updated successfully, but these errors were encountered: