diff options
Diffstat (limited to '')
-rw-r--r-- | sys/nixpkgs/pkgs/lf-make-map/src/cli.rs | 28 |
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, +} |