crabmail

Static HTML email archive viewer in Rust
git clone git://git.alexwennerberg.com/crabmail
Log | Files | Refs | README | LICENSE

commit d7bfebd23f3f7366f5f027212bc52fd7f1385b0d
parent 93b3a752bd9db39672c3035170080ebca76409d4
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Wed,  7 Apr 2021 23:09:21 -0700

Add basic pico args

Diffstat:
Msrc/main.rs | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs @@ -1,3 +1,15 @@ +const HELP: &str = "\ +Usage: crabmail + +FLAGS: + -h, --help Prints this help information and exits. +"; + fn main() { - println!("Hello, world!"); + let mut pargs = pico_args::Arguments::from_env(); + + if pargs.contains(["-h", "--help"]) { + print!("{}", HELP); + std::process::exit(0); + } }