mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 15:04:36 +03:00
ssh: allow selecting libssh or ssh2 backend via config
Pass this via the ssh option overrides: ``` wezterm ssh -o wezterm_ssh_backend=libssh hostname ```
This commit is contained in:
parent
1f073db776
commit
a6022f5c65
@ -63,10 +63,17 @@ impl SessionInner {
|
||||
}
|
||||
|
||||
fn run_impl(&mut self) -> anyhow::Result<()> {
|
||||
if true {
|
||||
self.run_impl_libssh()
|
||||
} else {
|
||||
self.run_impl_ssh2()
|
||||
let backend = self
|
||||
.config
|
||||
.get("wezterm_ssh_backend")
|
||||
.map(|s| s.as_str())
|
||||
.unwrap_or("ssh2");
|
||||
match backend {
|
||||
"ssh2" => self.run_impl_ssh2(),
|
||||
"libssh" => self.run_impl_libssh(),
|
||||
_ => anyhow::bail!(
|
||||
"invalid wezterm_ssh_backend value: {}, expected either `ssh2` or `libssh`"
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user