From dfca18db021bb3d2d0a3c126c59d9c5b9a07d9f9 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 23 Mar 2021 21:12:55 -0700 Subject: [PATCH] add hostname to ssh config map --- wezterm-ssh/src/config.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wezterm-ssh/src/config.rs b/wezterm-ssh/src/config.rs index 329e01a27..fa57abba6 100644 --- a/wezterm-ssh/src/config.rs +++ b/wezterm-ssh/src/config.rs @@ -253,6 +253,10 @@ impl Config { } } + result + .entry("hostname".to_string()) + .or_insert_with(|| host.to_string()); + result } @@ -444,6 +448,7 @@ Config { opts, r#" { + "hostname": "random", "something": "first", } "# @@ -455,6 +460,7 @@ Config { r#" { "fowardagent": "yes", + "hostname": "192.168.1.8", "identityfile": "/home/me/.ssh/id_pub.dsa", "something": "first", } @@ -466,6 +472,7 @@ Config { opts, r#" { + "hostname": "a.b", "something": "first", } "# @@ -477,6 +484,7 @@ Config { r#" { "forwardagent": "no", + "hostname": "b.b", "identityagent": "/home/me/.ssh/agent", "something": "first", }