purple-ssh 3.17.0

Open-source terminal SSH manager that keeps ~/.ssh/config in sync with your cloud infra. Spin up a VM on AWS, GCP, Azure, Hetzner or 12 other cloud providers and it appears in your host list. Destroy it and the entry dims. Search hundreds of hosts, transfer files, manage Docker and Podman over SSH, sign Vault SSH certs. Rust TUI, MIT licensed.
Documentation
use std::collections::HashMap;
use std::path::PathBuf;

/// Persistent per-host file-browser state: last-visited paths per alias.
#[derive(Debug, Default, Clone)]
pub struct FileBrowserState {
    pub(in crate::app) host_paths: HashMap<String, (PathBuf, String)>,
}

impl FileBrowserState {
    pub fn host_path(&self, alias: &str) -> Option<&(PathBuf, String)> {
        self.host_paths.get(alias)
    }

    pub fn contains_host(&self, alias: &str) -> bool {
        self.host_paths.contains_key(alias)
    }

    pub fn set_host_path(&mut self, alias: String, local: PathBuf, remote: String) {
        self.host_paths.insert(alias, (local, remote));
    }
}