aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/rbw/commands.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-19 05:42:22 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-19 05:42:22 -0400
commite323935ae8bd89560c0cdc6d6e6f873b0072650a (patch)
tree50613a510d1c4415b449eeb5082a1ed81551e33e /src/bin/rbw/commands.rs
parent32db6b408b9a3070795f7a29ba5c429471fb056b (diff)
downloadrbw-e323935ae8bd89560c0cdc6d6e6f873b0072650a.tar.gz
rbw-e323935ae8bd89560c0cdc6d6e6f873b0072650a.zip
allow getting notes along with a password
Diffstat (limited to 'src/bin/rbw/commands.rs')
-rw-r--r--src/bin/rbw/commands.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs
index 75ab8e3..839dca3 100644
--- a/src/bin/rbw/commands.rs
+++ b/src/bin/rbw/commands.rs
@@ -98,7 +98,7 @@ pub fn list() -> anyhow::Result<()> {
Ok(())
}
-pub fn get(name: &str, user: Option<&str>) -> anyhow::Result<()> {
+pub fn get(name: &str, user: Option<&str>, full: bool) -> anyhow::Result<()> {
unlock()?;
let email = config_email()?;
@@ -120,6 +120,12 @@ pub fn get(name: &str, user: Option<&str>) -> anyhow::Result<()> {
eprintln!("entry for '{}' had no password", desc);
}
+ if full {
+ if let Some(notes) = decrypted.notes {
+ println!("\n{}", notes);
+ }
+ }
+
Ok(())
}