feat: update ssh.rs

This commit is contained in:
2026-01-25 10:23:58 +08:00
parent c562c4886b
commit 7250bd1e59
5 changed files with 24 additions and 39 deletions

View File

@@ -5,7 +5,7 @@
//! rust_util = "0.6.50"
//! clap = { version = "4.5.49", features = ["derive"] }
//! serde = { version = "1.0.228", features = ["derive"] }
//! serde_json = "1.0.145"
//! json5 = "1.3.0"
//! ```
use clap::Parser;
@@ -245,7 +245,7 @@ fn load_ssh_rs_config() -> XResult<SshConfig> {
let config_file = get_ssh_rs_config_file();
let config_content = util_file::read_file_content(&config_file)?;
let config: SshConfig = opt_result!(
serde_json::from_str(config_content.as_str()),
json5::from_str(config_content.as_str()),
"Parse config failed: {}"
);
Ok(config)
@@ -255,5 +255,5 @@ fn get_ssh_rs_config_file() -> String {
util_env::env_var(ENV_SSH_RS_CONFIG_FILE).unwrap_or_else(|| SSH_RS_CONFIG_FILE.to_string())
}
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260102T200840+08:00.MEUCIQCIoEsCJwGL/nO9MUwA
// q3eig5RAt+p0uE4YJPn4wIJtuwIgA+n+sXBgtYjBNZ0lDfB1+fVC7N/3K/LjeWHkxv3/J8k=
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260125T102330+08:00.MEYCIQDAnPqJNTLeNAuSe+7l
// MvVNKf/JQPgKMLAYNh1eTeW+QAIhAKHonLpd2gHZmYXZKJCOpenIzr+d6umHK1EiMw1q9yp1