about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/lf-make-map/src/cli.rs
blob: 7650b39bb6852b58ccdd7226a3397466c6194d4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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,
}