aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/rbw/main.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-07-16 16:20:17 -0400
committerGitHub <noreply@github.com>2023-07-16 16:20:17 -0400
commit3e9bcc72938feee1491124ff8c5e8bec2f15bedc (patch)
tree278750c6c431c6fce9092f7890c0a8bad466f513 /src/bin/rbw/main.rs
parent389655d8f76b49a8a391deda28cf75bd99d17a96 (diff)
parentb06eab0609451ec449a88ed5141a658e16197eb0 (diff)
downloadrbw-3e9bcc72938feee1491124ff8c5e8bec2f15bedc.tar.gz
rbw-3e9bcc72938feee1491124ff8c5e8bec2f15bedc.zip
Merge pull request #120 from eatradish/result-to-clipboard
rbw get add flag --clipboard to copy result to clipboard
Diffstat (limited to 'src/bin/rbw/main.rs')
-rw-r--r--src/bin/rbw/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/rbw/main.rs b/src/bin/rbw/main.rs
index 4c706bd..3bede5b 100644
--- a/src/bin/rbw/main.rs
+++ b/src/bin/rbw/main.rs
@@ -83,6 +83,8 @@ enum Opt {
full: bool,
#[structopt(long, help = "Display output as JSON")]
raw: bool,
+ #[structopt(long, help = "Copy result to clipboard")]
+ clipboard: bool,
},
#[command(about = "Display the authenticator code for a given entry")]
@@ -322,6 +324,7 @@ fn main() {
field,
full,
raw,
+ clipboard
} => commands::get(
name,
user.as_deref(),
@@ -329,6 +332,7 @@ fn main() {
field.as_deref(),
*full,
*raw,
+ *clipboard,
),
Opt::Code { name, user, folder } => {
commands::code(name, user.as_deref(), folder.as_deref())