diff --git a/src/help.txt b/src/help.txt new file mode 100644 index 0000000..0e621d4 --- /dev/null +++ b/src/help.txt @@ -0,0 +1,8 @@ +Alternative for Cargo + +Usage: freight [COMMAND] [OPTIONS] + +Commands: + build Build a Freight or Cargo project + test Test a Freight or Cargo project + help Print out this message diff --git a/src/main.rs b/src/main.rs index 1fdb667..9e2ca57 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,14 +3,7 @@ use std::error::Error; use std::process; fn main() -> Result<(), Box> { - const HELP: &str = "\ - Alternative for Cargo\n\n\ - Usage: freight [COMMAND] [OPTIONS]\n\n\ - Commands:\n \ - build Build a Freight or Cargo project\n \ - test Test a Freight or Cargo project\n \ - help Print out this message - "; + const HELP: &str = include_str!("help.txt"); let mut args = env::args().skip(1); match args.next().as_ref().map(String::as_str) {