summaryrefslogtreecommitdiff
path: root/src/args.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/args.rs')
-rw-r--r--src/args.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs
new file mode 100644
index 0000000..d5efe2e
--- /dev/null
+++ b/src/args.rs
@@ -0,0 +1,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,
+}