about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/lf-make-map/src/cli.rs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-05 12:59:36 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-05 12:59:36 +0200
commit023b7cd0ada0cb153769bdcc931ef04512d125c4 (patch)
tree584315a010a9eccdd182e48801496ea4e226bfcb /sys/nixpkgs/pkgs/lf-make-map/src/cli.rs
parentbuild(treewide): Update (diff)
downloadnixos-config-023b7cd0ada0cb153769bdcc931ef04512d125c4.tar.gz
nixos-config-023b7cd0ada0cb153769bdcc931ef04512d125c4.zip
feat(pkgs/lf-make-map): Init
Diffstat (limited to '')
-rw-r--r--sys/nixpkgs/pkgs/lf-make-map/src/cli.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/nixpkgs/pkgs/lf-make-map/src/cli.rs b/sys/nixpkgs/pkgs/lf-make-map/src/cli.rs
new file mode 100644
index 00000000..7650b39b
--- /dev/null
+++ b/sys/nixpkgs/pkgs/lf-make-map/src/cli.rs
@@ -0,0 +1,28 @@
+use std::path::PathBuf;
+
+use clap::{ArgAction, Parser};
+
+/// An automatic lf cd mapping generator
+#[derive(Parser, Debug)]
+#[clap(author, version, about, long_about = None)]
+#[command(next_line_help = true)]
+pub struct Args {
+    /// The directory to treat as home
+    #[arg(long, short = 'n', env = "HOME")]
+    pub home_name: PathBuf,
+
+    /// The directories to generate mappings for
+    pub relevant_directories: Vec<PathBuf>,
+
+    /// The number of directories to generate mappings for, starting from each `relevant_directory`
+    #[arg(long, short, default_value = "2")]
+    pub depth: usize,
+
+    /// Increase message verbosity
+    #[arg(long="verbose", short = 'v', action = ArgAction::Count)]
+    pub verbosity: u8,
+
+    /// Silence all output
+    #[arg(long, short = 'q')]
+    pub quiet: bool,
+}