feat: udpate keyring.rs

This commit is contained in:
2025-10-20 00:09:39 +08:00
parent bee137c563
commit 8b0b289eb9
3 changed files with 17 additions and 12 deletions

View File

@@ -63,6 +63,9 @@ pub struct CmdGet {
// JSON output
#[arg(long)]
pub json: bool,
// Raw output
#[arg(long)]
pub raw: bool,
}
fn main() -> XResult<()> {
@@ -93,6 +96,8 @@ fn main() -> XResult<()> {
result.insert("user", cmd_get.user.to_string());
result.insert("password", password.to_string());
println!("{}", serde_json::to_string_pretty(&result)?);
} else if cmd_get.raw {
print!("{}", password);
} else {
success!("Got password: {}", password);
}
@@ -101,5 +106,5 @@ fn main() -> XResult<()> {
Ok(())
}
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20251019T145514+08:00.MEUCIQDgJgYEeTPSuknNc6eR
// Ms8aT4vjloKezJUblkBPKiSDFQIgDfLdrgc4GgkjyKGe4YcjqSxTutaSAJ/KIitSvzpjg+U=
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20251020T000849+08:00.MEQCIFcMEJOSE3+uJTzhAE1C
// nV8sLPXE3E1uspg7Q7uLYzW/AiAFdhpS/8OLK6Ex2alVVHQOAkTnpP57pKLKWnxf+HNbMw==