From b9a6aeaa68bba83c47823e142de327369520ab80 Mon Sep 17 00:00:00 2001 From: uptu Date: Sun, 18 Feb 2024 22:56:43 -0700 Subject: [PATCH] Customized help template more --- src/main.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index f983a8f..3a8359c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,11 +15,18 @@ fn styles() -> Styles { } /// The --help string -const HELP: &'static str = "\x1b[0;1;95;4mPi\x1b[0m is a CLI \x1b[34mproject initializer\x1b[0m which uses per-language build tools to create project directories populated with a full project template."; +const HELP: &'static str = "\x1b[0;1;92;4mPi\x1b[0m is a CLI \x1b[34mproject initializer\x1b[0m which uses per-language build tools to create project directories populated with a full project template."; /// The arguments to be pushed to the rest of the program #[derive(Parser, Debug)] -#[command(version, about = HELP, styles = styles(), long_about = None, next_line_help = true)] +#[command(version, author = "\x1b[0;93muptu\x1b[0m, \x1b[33muptu@uptu.dev\x1b[0m", about = HELP, styles = styles(), long_about = None, next_line_help = true, help_template = "\ +{before-help}\x1b[1;95;4m{name}\x1b[0;95;4m {version}\x1b[0m +{author-with-newline} +{about-with-newline} +{usage-heading} {usage} + +{all-args}{after-help} +")] struct Args { /// The name of the project #[arg(name = "NAME", short = 'n', long = "name", verbatim_doc_comment)]