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:
1 parent
565af9b9f7
commit
e7e7f059f6
10 files changed
+55
-85
No files matched your search
@@ -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()
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user