Stricten Zed Task variable API (#10163)
Introduce `VariableName` enum to simplify Zed task templating management: now all the variables can be looked up statically and can be checked/modified in a centralized way: e.g. `ZED_` prefix is now added for all such custom vars. Release Notes: - N/A
This commit is contained in:
parent
ee1b1779f1
commit
1085642c88
10 changed files with 188 additions and 91 deletions
|
@ -366,9 +366,7 @@ impl PickerDelegate for TasksModalDelegate {
|
|||
let task_index = self.matches.get(self.selected_index())?.candidate_id;
|
||||
let tasks = self.candidates.as_ref()?;
|
||||
let (_, task) = tasks.get(task_index)?;
|
||||
// .exec doesn't actually spawn anything; it merely prepares a spawning command,
|
||||
// which we can use for substitution.
|
||||
let mut spawn_prompt = task.exec(self.task_context.clone())?;
|
||||
let mut spawn_prompt = task.prepare_exec(self.task_context.clone())?;
|
||||
if !spawn_prompt.args.is_empty() {
|
||||
spawn_prompt.command.push(' ');
|
||||
spawn_prompt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue