Skip to content

Commit 0f4277a

Browse files
committed
feat: support sftp
1 parent 0b9971e commit 0f4277a

File tree

1 file changed

+15
-1
lines changed
  • crates/egui-term/src/ssh

1 file changed

+15
-1
lines changed

crates/egui-term/src/ssh/mod.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use alacritty_terminal::tty::{ChildEvent, EventedPty, EventedReadWrite};
55
use anyhow::Context;
66
use polling::{Event, PollMode, Poller};
77
use std::collections::HashMap;
8+
use std::ops::{Deref, DerefMut};
89
use std::sync::Arc;
910
use tracing::{error, trace};
1011
use wezterm_ssh::{
@@ -261,7 +262,7 @@ impl SshSession {
261262
env.insert("LANG".to_string(), "en_US.UTF-8".to_string());
262263
env.insert("LC_COLLATE".to_string(), "C".to_string());
263264

264-
let (pty, child) = smol::block_on(self.0.request_pty(
265+
let (pty, child) = smol::block_on(self.request_pty(
265266
"xterm-256color",
266267
PtySize::default(),
267268
None,
@@ -301,6 +302,19 @@ impl SshSession {
301302
}
302303
}
303304

305+
impl Deref for SshSession {
306+
type Target = Session;
307+
fn deref(&self) -> &Self::Target {
308+
&self.0
309+
}
310+
}
311+
312+
impl DerefMut for SshSession {
313+
fn deref_mut(&mut self) -> &mut Self::Target {
314+
&mut self.0
315+
}
316+
}
317+
304318
#[derive(Debug, Clone, PartialEq)]
305319
pub struct SshOptions {
306320
pub group: String,

0 commit comments

Comments
 (0)