Add support for Nushell in shell builder (#33806)
We also swap out env variables before sending them to shells now in the task system. This fixed issues Fish and Nushell had where an empty argument could be sent into a command when no argument should be sent. This only happened from task's generated by Zed. Closes #31297 #31240 Release Notes: - Fix bug where spawning a Zed generated task or debug session with Fish or Nushell failed
This commit is contained in:
parent
0ca0914cca
commit
bcac748c2b
2 changed files with 123 additions and 8 deletions
|
@ -256,7 +256,7 @@ impl TaskTemplate {
|
|||
},
|
||||
),
|
||||
command: Some(command),
|
||||
args: self.args.clone(),
|
||||
args: args_with_substitutions,
|
||||
env,
|
||||
use_new_terminal: self.use_new_terminal,
|
||||
allow_concurrent_runs: self.allow_concurrent_runs,
|
||||
|
@ -642,11 +642,11 @@ mod tests {
|
|||
assert_eq!(
|
||||
spawn_in_terminal.args,
|
||||
&[
|
||||
"arg1 $ZED_SELECTED_TEXT",
|
||||
"arg2 $ZED_COLUMN",
|
||||
"arg3 $ZED_SYMBOL",
|
||||
"arg1 test_selected_text",
|
||||
"arg2 5678",
|
||||
"arg3 010101010101010101010101010101010101010101010101010101010101",
|
||||
],
|
||||
"Args should not be substituted with variables"
|
||||
"Args should be substituted with variables"
|
||||
);
|
||||
assert_eq!(
|
||||
spawn_in_terminal.command_label,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue