Skip to content

Commit

Permalink
Customized help template more
Browse files Browse the repository at this point in the history
  • Loading branch information
uptudev committed Feb 19, 2024
1 parent 3a64f0d commit b9a6aea
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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[[email protected]\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)]
Expand Down

0 comments on commit b9a6aea

Please sign in to comment.