Command line help: Add hint about platform overrides (#375)

- Rename PLATFORMS to PLATFORM
- Add hint about specifying platform multiple times
This commit is contained in:
Danilo Bargen 2024-08-13 00:14:19 +02:00 committed by GitHub
commit 7c245040b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 17 deletions

View file

@ -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 <FILE> Render a specific markdown file
-p, --platform <PLATFORMS> Override the operating system [possible values: linux, macos, sunos,
windows, android, freebsd, netbsd, openbsd]
-L, --language <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 <WHEN> 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 <FILE> Render a specific markdown file
-p, --platform <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 <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 <WHEN> 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/.

View file

@ -41,10 +41,11 @@ pub(crate) struct Cli {
)]
pub render: Option<PathBuf>,
/// 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<Vec<PlatformType>>,