summaryrefslogtreecommitdiff
path: root/src/args.rs
blob: d5efe2ed2b76b6d6158cdb5a73ba60e945dce584 (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
use clap::Parser;

#[derive(Debug, Parser)]
#[clap(name="deskwhich", version=env!("CARGO_PKG_VERSION"),about=env!("CARGO_PKG_DESCRIPTION"), author=env!("CARGO_PKG_AUTHORS"))]
pub struct Cli {

    /// The desktop file to search for
    pub search: String,
    
    /// Skip directories in XDG_DATA_DIRS that start with a dot
    #[arg(long, default_value_t=false)]
    pub skip_dot: bool,

    /// Skip directories in XDG_DATA_DIRS that start with the home directory
    #[arg(long, default_value_t=false)]
    pub skip_home: bool,

    /// Print all matches in XDG_DATA_DIRS, not just the first
    #[arg(short, long, default_value_t=false)]
    pub all: bool,

    //show_dot: bool,

    /// Output a tilde for HOME directory
    #[arg(long, default_value_t=false)]
    pub show_tilde: bool,
}