summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
new file mode 100644
index 0000000..9098cfe
--- /dev/null
+++ b/src/cli.rs
@@ -0,0 +1,36 @@
+use clap::App;
+use clap::Arg;
+use clap::crate_authors;
+use clap::crate_version;
+
+pub fn app<'a>() -> App<'a, 'a> {
+
+ App::new("fss")
+ .author(crate_authors!())
+ .version(crate_version!())
+ .about("Filesystemsearch")
+
+ .subcommand(App::new("index")
+ .version(crate_version!())
+ .about("Index a file")
+ .arg(Arg::with_name("file")
+ .required(true)
+ .multiple(true)
+ .value_name("FILE")
+ .help("Index these files")
+ )
+ )
+
+ .subcommand(App::new("search")
+ .version(crate_version!())
+ .about("Search for a file")
+ .arg(Arg::with_name("term")
+ .required(true)
+ .multiple(true)
+ .value_name("TERM")
+ .help("Search with these terms")
+ )
+ )
+}
+
+