Tasks - do they support arg from user input ? #10823
-
For example something like:
When running task 'test', execution would wait for user input, after entering it it would output "Hello world" Asking this, because I am not sure how args are currenlty working (didn't find much documentation about it). But from first look it looks like arg is just something that gets appended at the end of command as argument But what is the point of this if you have to edit task json to change the arg ? Am I missing something here ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Example from VSCode of what I am trying to achieve using Tasks:
I want PORT to be inserted by user on task run |
Beta Was this translation helpful? Give feedback.
-
There are no support for user arguments (yet?), so Zed is not capable to wait for any extra input from the user. Yet tasks themselves are templates, and Zed provides a set of template variables to use, automatically substituting those before running: https://zed.dev/docs/tasks That might help a bit in your case, maybe. |
Beta Was this translation helpful? Give feedback.
There are no support for user arguments (yet?), so Zed is not capable to wait for any extra input from the user.
Yet tasks themselves are templates, and Zed provides a set of template variables to use, automatically substituting those before running: https://zed.dev/docs/tasks
That might help a bit in your case, maybe.