mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 11:18:36 +00:00
feat: add --help for all commands, man pages
This commit is contained in:
@@ -25,6 +25,16 @@ use std::io::Write;
|
||||
use toml::Value;
|
||||
|
||||
pub fn init(args: &[String]) -> i32 {
|
||||
if args.first().map_or(false, |a| a == "--help") {
|
||||
printc("USAGE:", BOLD_GREEN);
|
||||
printc(" dcr init", BOLD_CYAN);
|
||||
println!();
|
||||
printc("DESCRIPTION:", BOLD_GREEN);
|
||||
println!(" Initializes the current directory as a DCR project.");
|
||||
println!(" The directory must be empty.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if !args.is_empty() {
|
||||
warn("Command does not support additional arguments");
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user