tui: coalesce command output; show unabridged commands in transcript (#2590)
https://github.com/user-attachments/assets/effec7c7-732a-4b61-a2ae-3cb297b6b19b
This commit is contained in:
@@ -9,13 +9,7 @@ pub(crate) fn escape_command(command: &[String]) -> String {
|
||||
|
||||
pub(crate) fn strip_bash_lc_and_escape(command: &[String]) -> String {
|
||||
match command {
|
||||
// exactly three items
|
||||
[first, second, third]
|
||||
// first two must be "bash", "-lc"
|
||||
if first == "bash" && second == "-lc" =>
|
||||
{
|
||||
third.clone() // borrow `third`
|
||||
}
|
||||
[first, second, third] if first == "bash" && second == "-lc" => third.clone(),
|
||||
_ => escape_command(command),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user