index : bitwarden-ssh-agent.git

ascending towards madness

author holly sparkles <sparkles@holly.sh> 2023-07-28 14:54:19.0 +00:00:00
committer holly sparkles <sparkles@holly.sh> 2023-07-28 14:54:19.0 +00:00:00
commit
6a928ce1c1ea497faaef16825c7c620a7c27415f [patch]
tree
5a74da79beafa774c1e513bc3a4b406e8ba0b4d2
parent
98e354679a00d29f64ec629aedd7bbc5ed6f7fc6
parent
6f592f7e930519823f649417496f6cea37383d37
download
6a928ce1c1ea497faaef16825c7c620a7c27415f.tar.gz

Merge branch 'feature/cli-args' into develop



Diff

 Cargo.toml  |  1 +
 src/main.rs | 23 ++++++++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Cargo.toml b/Cargo.toml
index a6ad64f..61681da 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,3 +6,4 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
gumdrop = "0.8.1"
\ No newline at end of file
diff --git a/src/main.rs b/src/main.rs
index e7a11a9..92be148 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,24 @@
use gumdrop::Options;

#[derive(Debug, Options)]
struct Cli {
	#[options(help = "print help message and exit")]
    help: bool,
	#[options(help = "show debug output")]
	debug: bool,
	#[options(help = "folder name to use to search for SSH keys", default = "ssh-agent")]
	folder: String,
	#[options(help = "custom field name where the private key is stored", meta = "PRIVATE_KEY", default = "private-key")]
	key: String,
	#[options(help = "custom field name where the key passphrase is stored", meta = "PASS", default = "passphrase")]
	passphrase: String,
	#[options(help = "session to use to log in to bitwarden-cli")]
	session: Option<String>,
	#[options(help = "print version and exit")]
    version: bool,
}

fn main() {
    println!("Hello, world!");
    let args: Cli = Cli::parse_args_default_or_exit();
	println!("{:#?}", args);
}