1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 21:32:13 +03:00

gui-startup event now also works for wezterm ssh.

This is done by adjusting how `wezterm ssh` works; we now set up
the default domain and call into the main `wezterm start` logic.

refs: #284
This commit is contained in:
Wez Furlong 2022-08-20 08:01:45 -07:00
parent 429c18b7ee
commit 8b2ef50ca7
2 changed files with 16 additions and 1 deletions

View File

@ -27,6 +27,7 @@ As features stabilize some brief notes about them will accumulate here.
* tab titles truncated too short [#2379](https://github.com/wez/wezterm/issues/2379)
* `bypass_mouse_reporting_modifiers` stopped working (regression around new mouse binding logic) [#2389](https://github.com/wez/wezterm/issues/2389)
* Entering IME-composed text would have no effect in `wezterm ssh` [#2434](https://github.com/wez/wezterm/issues/2434)
* `gui-startup` event now also works with `wezterm ssh`
### 20220807-113146-c2fee766

View File

@ -130,6 +130,16 @@ async fn async_run_ssh(opts: SshCommand) -> anyhow::Result<()> {
..Default::default()
};
let start_command = StartCommand {
always_new_process: true,
class: opts.class,
cwd: None,
no_auto_connect: true,
position: opts.position,
workspace: None,
prog: opts.prog.clone(),
};
let cmd = if !opts.prog.is_empty() {
let builder = CommandBuilder::from_argv(opts.prog);
Some(builder)
@ -138,8 +148,12 @@ async fn async_run_ssh(opts: SshCommand) -> anyhow::Result<()> {
};
let domain: Arc<dyn Domain> = Arc::new(mux::ssh::RemoteSshDomain::with_ssh_domain(&dom)?);
let mux = Mux::get().unwrap();
mux.add_domain(&domain);
mux.set_default_domain(&domain);
async_run_with_domain_as_default(domain, cmd).await
let should_publish = false;
async_run_terminal_gui(cmd, start_command, should_publish).await
}
fn run_ssh(opts: SshCommand) -> anyhow::Result<()> {