diff --git a/docs/src/usage.txt b/docs/src/usage.txt index 82467022..410dee2c 100644 --- a/docs/src/usage.txt +++ b/docs/src/usage.txt @@ -3,27 +3,24 @@ Danilo Bargen A fast TLDR client USAGE: - tldr [FLAGS] [OPTIONS] [command]... + tldr [OPTIONS] [command]... ARGS: ... The command to show (e.g. `tar` or `git log`) -FLAGS: - -c, --clear-cache Clear the local cache - --config-path Show config file path - -h, --help Prints help information - -l, --list List all commands in the cache - -m, --markdown Display the raw markdown instead of rendering it - -p, --pager Use a pager to page output - -q, --quiet Suppress informational messages - --seed-config Create a basic config - --show-paths Show file and directory paths used by tealdeer - -u, --update Update the local cache - -v, --version Prints the version - OPTIONS: - --color Control whether to use color [always, auto, never] - -L, --language Override the language - -o, --os Override the operating system [linux, macos, sunos, windows] + -l, --list List all commands in the cache -f, --render Render a specific markdown file - + -o, --os Override the operating system [linux, macos, sunos, windows] + -L, --language Override the language + -u, --update Update the local cache + -c, --clear-cache Clear the local cache + -p, --pager Use a pager to page output + -q, --quiet Suppress informational messages + -m, --markdown Display the raw markdown instead of rendering it + --show-paths Show file and directory paths used by tealdeer + --config-path Show config file path + --seed-config Create a basic config + --color Control whether to use color [always, auto, never] + -v, --version Prints the version + -h, --help Prints help information diff --git a/src/main.rs b/src/main.rs index 69c96ad1..d04abd53 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,6 +55,8 @@ const PAGER_COMMAND: &str = "less -R"; #[clap(about = "A fast TLDR client", author, version)] #[clap(setting = AppSettings::ArgRequiredElseHelp)] #[clap(setting = AppSettings::HelpRequired)] +#[clap(setting = AppSettings::DeriveDisplayOrder)] +#[clap(setting = AppSettings::UnifiedHelpMessage)] struct Args { /// The command to show (e.g. `tar` or `git log`) #[clap(min_values = 1)] @@ -88,14 +90,14 @@ struct Args { #[clap(short = 'p', long = "pager", requires = "command")] pager: bool, - /// Suppress informational messages - #[clap(short = 'q', long = "quiet")] - quiet: bool, - /// Display the raw markdown instead of rendering it #[clap(short = 'm', long = "markdown", requires = "command")] markdown: bool, + /// Suppress informational messages + #[clap(short = 'q', long = "quiet")] + quiet: bool, + /// Show file and directory paths used by tealdeer #[clap(long = "show-paths")] show_paths: bool,