Adds updating notes and urls and warning about TOTP (which can't be updated through pass-cli)

This commit is contained in:
2026-07-20 20:50:20 +02:00
parent 22568554af
commit d3e971fecd
2 changed files with 32 additions and 17 deletions
+4 -3
View File
@@ -148,7 +148,7 @@ pub fn update(vault: &String, item: LoginItem, user_is_actually_email: bool) {
let maybe_urls = if let Some(urls) = item.urls {
let mut it = "".to_string();
for url in urls {
it = format!("{} --field 'url={}'", it, url);
it = format!("{} --field 'urls={}'", it, url);
}
it
} else {
@@ -160,10 +160,11 @@ pub fn update(vault: &String, item: LoginItem, user_is_actually_email: bool) {
format!("--field 'note={}'", item.notes)
};
let output = sh::sh(format!(
let cmd = format!(
"{} item update --vault-name '{}' --item-id '{}' --field 'password={}' --field '{}' {} {}",
EXECUTABLE, vault, item.id, item.password, user_field_update, maybe_urls, maybe_notes
));
);
let output = sh::sh(cmd.clone());
println!("> {}", output);
}