From 7dc68e9a3fa65166e6fad604922eacbb1bccd2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Mon, 3 Jul 2023 13:28:11 +0200 Subject: [PATCH] fix: fixed help formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The formatting was kinda broken because I was using multi line strings like I was writing nix :S Signed-off-by: Christina Sørensen --- src/cli.rs | 11 ++++++----- src/utils/strings.rs | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 29d0183..8c9ed78 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -24,13 +24,14 @@ use clap::{ArgAction, CommandFactory, Parser, Subcommand}; const CONFIG_FILE: &str = "/.config/gg/config.yaml"; const HELP_TEMPLATE: &str = "\ - {before-help}{name} {version} - {author-with-newline}{about-with-newline} - {usage-heading} {usage} +{before-help}{name} {version} +{about-with-newline} - {all-args}{after-help} +{usage-heading} {usage} - "; +{all-args}{after-help} + +"; //#[clap(author, version, about, long_about = None)] #[derive(Parser, Debug)] diff --git a/src/utils/strings.rs b/src/utils/strings.rs index 876b80d..e846e99 100644 --- a/src/utils/strings.rs +++ b/src/utils/strings.rs @@ -22,11 +22,11 @@ /// Contains the notice for interactive programs from the GPLv3's "How to Apply /// These Terms to Your New Programs" pub const INTERACTIVE_NOTICE: &str = "\ -gg Copyright (C) 2023 Christina Sørensen -This program comes with ABSOLUTELY NO WARRANTY; for details type `gg --warranty'. -This is free software, and you are welcome to redistribute it -under certain conditions; type `gg --license' for details. -"; +gg Copyright (C) 2023 Christina Sørensen + +This program comes with ABSOLUTELY NO WARRANTY; for details type `gg +--warranty'. This is free software, and you are welcome to redistribute it under +certain conditions; type `gg --license' for details. "; /// Contains the license part of the long notice for interactive programs from /// the GPLv3's "How to Apply These Terms to Your New Programs"