diff --git a/src/platform.rs b/src/platform.rs index 49177b4..4dc8cc2 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -157,6 +157,7 @@ Host {host} match action { 0 => { // Connect + // TODO: clear screen before connect std::process::Command::new("ssh") .arg("-F") .arg(host.config.to_owned()) @@ -177,7 +178,8 @@ Host {host} 2 => { // Edit definition let edited_host = host.edit()?; config.configs.remove(host); - config.configs.insert(edited_host); + config.configs.insert(edited_host.to_owned()); + host.clone_from(&edited_host); config.save(); } 3 => { // Delete