From 96ff6297ef390079d4bf528077221c3165dc49ea Mon Sep 17 00:00:00 2001 From: emilylime Date: Wed, 4 Sep 2024 08:57:49 +0300 Subject: [PATCH] Add --no-discord for consistency --- src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.rs b/src/main.rs index 8bb907c..a5fe10a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,16 @@ struct Args { #[clap(short, long)] discord: bool, + /// Wrap the output in a Discord-flavoured-markdown–style ANSI codeblock. + #[clap(short, long, overrides_with = "_no_discord")] + discord: bool, + + /// Don't wrap the output in a markdown-style codeblock. [default] + #[clap(short = 'D', long = "no-discord")] + #[clap(hide_short_help = true)] + #[doc(hidden)] + _no_discord: bool, + // Logically this comes after `Args::strip_ansi`, but in clap it makes more sense before. // Also see https://jwodder.github.io/kbits/posts/clap-bool-negate/ /// Strip all ANSI escape sequences from the input before processing. [default]