Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/ssh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,15 @@ async fn run_session(
msg = channel.wait() => {
match msg {
Some(ChannelMsg::Data { data }) => {
// Reply to Primary Device Attribute query (ESC [ c or ESC [ 0 c)
// so shells like fish don't hang for 10 seconds waiting for it.
let bytes = &data[..];
if bytes.windows(3).any(|w| w == b"\x1b[c")
|| bytes.windows(4).any(|w| w == b"\x1b[0c")
{
let _ = channel.data(&b"\x1b[?1;2c"[..]).await;
}

// A `sz` in the terminal starts a ZMODEM send. Receive it
// straight to the Downloads dir (FinalShell style, #76).
// On any protocol error, cancel so the session recovers.
Expand Down