summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index 28f08cd..51ca0f2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -14,7 +14,6 @@ const ERROR_RUN_ROOT: u8 = 6;
mod persist;
mod flags;
-mod help;
mod secure;
fn main() -> ExitCode {
@@ -22,7 +21,7 @@ fn main() -> ExitCode {
let flags = match flags::parse(&args[1..]) {
Some(data) => data,
None => {
- help::help();
+ help();
return ExitCode::from(ERROR_ARGS);
}
};
@@ -31,7 +30,7 @@ fn main() -> ExitCode {
return ExitCode::SUCCESS;
}
if flags.help {
- help::help();
+ help();
return ExitCode::SUCCESS;
}
if args.len() - flags.arg_count < 2 {
@@ -74,6 +73,17 @@ fn main() -> ExitCode {
ExitCode::SUCCESS
}
+fn help() {
+ let help =
+"Usage:
+ crab [-d] command [args]
+Options:
+ -v --version Get the current version of the package
+ -h --help Generates the crab help message
+ -d If your user is set to persist, dont save persistance";
+ println!("{}", help);
+}
+
struct Config {
users: Vec<(String, bool)>
}