fix: scope ssh shell niceties to cmux ssh

This commit is contained in:
Lawrence Chen 2026-02-20 21:51:35 -08:00
parent fb35f3bc39
commit bbd8b2b311
4 changed files with 12 additions and 89 deletions

View file

@ -1899,7 +1899,10 @@ struct CMUXCLI {
}
parts.append(options.destination)
parts.append(contentsOf: options.extraArguments)
return parts.map(shellQuote).joined(separator: " ")
let sshCommand = parts.map(shellQuote).joined(separator: " ")
// Scope Ghostty SSH niceties to `cmux ssh ...` launches only.
let shellFeatures = "GHOSTTY_SHELL_FEATURES=${GHOSTTY_SHELL_FEATURES:+$GHOSTTY_SHELL_FEATURES,}ssh-env,ssh-terminfo"
return shellFeatures + " " + sshCommand
}
private func shellQuote(_ value: String) -> String {