Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Wrap terminal commands in single quotation marks instead of backticks (#17637)

bestgopher37b2f4b9d36a
diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs
index bd4dfed0fa2..12a7349af07 100644
--- a/crates/terminal/src/terminal.rs
+++ b/crates/terminal/src/terminal.rs
@@ -1596,7 +1596,7 @@ fn task_summary(task: &TaskState, error_code: Option<i32>) -> (bool, String, Str
}
};
let escaped_command_label = task.command_label.replace("\r\n", "\r").replace('\n', "\r");
- let command_line = format!("{TASK_DELIMITER}Command: '{escaped_command_label}'");
+ let command_line = format!("{TASK_DELIMITER}Command: {escaped_command_label}");
(success, task_line, command_line)
}
diff --git a/crates/terminal_view/src/terminal_panel.rs b/crates/terminal_view/src/terminal_panel.rs
index 1e8d09f0a68..f745fbe348b 100644
--- a/crates/terminal_view/src/terminal_panel.rs
+++ b/crates/terminal_view/src/terminal_panel.rs
@@ -397,7 +397,7 @@ impl TerminalPanel {
#[cfg(not(target_os = "windows"))]
{
- spawn_task.command_label = format!("{shell} -i -c `{}`", spawn_task.command_label);
+ spawn_task.command_label = format!("{shell} -i -c '{}'", spawn_task.command_label);
}
#[cfg(target_os = "windows")]
{
@@ -405,14 +405,14 @@ impl TerminalPanel {
match windows_shell_type {
WindowsShellType::Powershell => {
- spawn_task.command_label = format!("{shell} -C `{}`", spawn_task.command_label)
+ spawn_task.command_label = format!("{shell} -C '{}'", spawn_task.command_label)
}
WindowsShellType::Cmd => {
- spawn_task.command_label = format!("{shell} /C `{}`", spawn_task.command_label)
+ spawn_task.command_label = format!("{shell} /C '{}'", spawn_task.command_label)
}
WindowsShellType::Other => {
spawn_task.command_label =
- format!("{shell} -i -c `{}`", spawn_task.command_label)
+ format!("{shell} -i -c '{}'", spawn_task.command_label)
}
}
}