Properly pass nested script arguments for tasks (#10776)
Closes https://github.com/zed-industries/zed/discussions/10732#discussion-6524347 introduced by https://github.com/zed-industries/zed/pull/10548 while keeping both Python and Bash run selection capabilities. Also replaced redundant `SpawnTask` struct with `SpawnInTerminal` that has identical fields. Release Notes: - Fixed incorrect task escaping of nested script arguments --------- Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
This commit is contained in:
parent
9247da77a3
commit
13c17267b9
10 changed files with 55 additions and 85 deletions
|
@ -186,13 +186,7 @@ pub(super) fn python_task_context() -> ContextProviderWithTasks {
|
|||
TaskTemplate {
|
||||
label: "execute selection".to_owned(),
|
||||
command: "python3".to_owned(),
|
||||
args: vec![
|
||||
"-c".to_owned(),
|
||||
format!(
|
||||
"exec(r'''{}''')",
|
||||
VariableName::SelectedText.template_value()
|
||||
),
|
||||
],
|
||||
args: vec!["-c".to_owned(), VariableName::SelectedText.template_value()],
|
||||
ignore_previously_resolved: true,
|
||||
..TaskTemplate::default()
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue