From 5f357b89cb6a49be1c5461fa4b6cd5aaec8e541f Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Thu, 25 Apr 2024 00:27:56 +0200
Subject: [PATCH] feat: Ability to enter password via stdin `add`&`edit` (#15)
Reviewed-on: https://git.4rs.nl/awiteb/lprs/pulls/15
Co-authored-by: Awiteb
Co-committed-by: Awiteb
---
src/cli/add_command.rs | 24 +++++++++++++--
src/cli/clean_command.rs | 2 +-
src/cli/edit_command.rs | 65 +++++++++++++++++++++++----------------
src/cli/export_command.rs | 2 +-
src/cli/gen_command.rs | 2 +-
src/cli/import_command.rs | 8 ++---
src/cli/list_command.rs | 2 +-
src/cli/remove_command.rs | 2 +-
src/macros.rs | 2 +-
src/traits.rs | 2 +-
src/vault/mod.rs | 17 +++++-----
11 files changed, 80 insertions(+), 48 deletions(-)
diff --git a/src/cli/add_command.rs b/src/cli/add_command.rs
index 25009c6..ce3c8df 100644
--- a/src/cli/add_command.rs
+++ b/src/cli/add_command.rs
@@ -26,18 +26,36 @@ use crate::{
pub struct Add {
#[command(flatten)]
vault_info: Vault,
+ /// The password, if there is no value for it you will prompt it
+ #[arg(short, long)]
+ password: Option