From 7c245040b9df46e9577c16a43166380efe6dc025 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 13 Aug 2024 00:14:19 +0200 Subject: [PATCH] Command line help: Add hint about platform overrides (#375) - Rename PLATFORMS to PLATFORM - Add hint about specifying platform multiple times --- docs/src/usage.txt | 33 +++++++++++++++++---------------- src/cli.rs | 3 ++- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 7e823c4..b1e7e35 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -7,21 +7,22 @@ Arguments: [COMMAND]... The command to show (e.g. `tar` or `git log`) Options: - -l, --list List all commands in the cache - -f, --render Render a specific markdown file - -p, --platform Override the operating system [possible values: linux, macos, sunos, - windows, android, freebsd, netbsd, openbsd] - -L, --language Override the language - -u, --update Update the local cache - --no-auto-update If auto update is configured, disable it for this run - -c, --clear-cache Clear the local cache - --pager Use a pager to page output - -r, --raw Display the raw markdown instead of rendering it - -q, --quiet Suppress informational messages - --show-paths Show file and directory paths used by tealdeer - --seed-config Create a basic config - --color Control whether to use color [possible values: always, auto, never] - -v, --version Print the version - -h, --help Print help + -l, --list List all commands in the cache + -f, --render Render a specific markdown file + -p, --platform Override the operating system, can be specified multiple times in order + of preference [possible values: linux, macos, sunos, windows, android, + freebsd, netbsd, openbsd] + -L, --language Override the language + -u, --update Update the local cache + --no-auto-update If auto update is configured, disable it for this run + -c, --clear-cache Clear the local cache + --pager Use a pager to page output + -r, --raw Display the raw markdown instead of rendering it + -q, --quiet Suppress informational messages + --show-paths Show file and directory paths used by tealdeer + --seed-config Create a basic config + --color Control whether to use color [possible values: always, auto, never] + -v, --version Print the version + -h, --help Print help To view the user documentation, please visit https://dbrgn.github.io/tealdeer/. diff --git a/src/cli.rs b/src/cli.rs index fd6c987..77acf6b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -41,10 +41,11 @@ pub(crate) struct Cli { )] pub render: Option, - /// Override the operating system + /// Override the operating system, can be specified multiple times in order of preference #[arg( short = 'p', long = "platform", + value_name = "PLATFORM", action = ArgAction::Append, )] pub platforms: Option>,