diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f44bb31..c744c5fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - Added a new VimHelp syntax, see #2366 (@Freed-Wu) - Associate `pdm.lock` with `TOML` syntax, see #2410 - `Todo.txt`: Fix highlighting of contexts and projects at beginning of done.txt, see #2411 +- `cmd-help`: overhaul scope names (colors) to improve theme support; misc syntax improvements. See #2419 (@victor-gp) ## Themes diff --git a/assets/syntaxes/02_Extra/cmd-help b/assets/syntaxes/02_Extra/cmd-help index ade16bf1..9b256829 160000 --- a/assets/syntaxes/02_Extra/cmd-help +++ b/assets/syntaxes/02_Extra/cmd-help @@ -1 +1 @@ -Subproject commit ade16bf1c10fe88ef8d71e7e0a8769f366e5a522 +Subproject commit 9b256829473669cbdc8c97af81242a7a55e998fc diff --git a/tests/syntax-tests/highlighted/cmd-help/test.cmd-help b/tests/syntax-tests/highlighted/cmd-help/test.cmd-help index c758a0d9..d71c2af0 100644 --- a/tests/syntax-tests/highlighted/cmd-help/test.cmd-help +++ b/tests/syntax-tests/highlighted/cmd-help/test.cmd-help @@ -1,54 +1,43 @@ -bat 0.20.0 (e735562-modified) -A cat(1) clone with syntax highlighting and Git integration. +bat 0.22.1 +A cat(1) clone with wings. -USAGE: +Use '--help' instead of '-h' to see a more detailed version of the help text. + +USAGE:  bat [OPTIONS] [FILE]...  bat  -OPTIONS: - -A, --show-all - Show non-printable characters (space, tab, newline, ..). +ARGS: + ... File(s) to print / concatenate. Use '-' for standard input. - -p, --plain Show plain style (alias for '--style=plain'). - -l, --language  Set the language for syntax highlighting. - -H, --highlight-line ... Highlight lines N through M. - --file-name ... Specify the name to display for a file. - -d, --diff - Only show lines that have been added/removed/modified. +OPTIONS: + -A, --show-all Show non-printable characters (space, tab, newline, ..). + -p, --plain Show plain style (alias for '--style=plain'). + -l, --language  Set the language for syntax highlighting. + -H, --highlight-line  Highlight lines N through M. + --file-name  Specify the name to display for a file. + -d, --diff Only show lines that have been added/removed/modified. + --tabs  Set the tab width to T spaces. + --wrap  Specify the text-wrapping mode (*auto*, never, character). + -n, --number Show line numbers (alias for '--style=numbers'). + --color  When to use colors (*auto*, never, always). + --italic-text  Use italics in output (always, *never*) + --decorations  When to show the decorations (*auto*, never, always). + --paging  Specify when to use the pager, or use `-P` to disable (*auto*, + never, always). + -m, --map-syntax  Use the specified syntax for files matching the glob pattern + ('*.cpp:C++'). + --theme  Set the color theme for syntax highlighting. + --list-themes Display all supported highlighting themes. + --style  Comma-separated list of style elements to display (*default*, + auto, full, plain, changes, header, header-filename, + header-filesize, grid, rule, numbers, snip). + -r, --line-range  Only print the lines from N to M. + -L, --list-languages Display all supported languages. + -h, --help Print this help message. + -V, --version Print version information - --tabs  Set the tab width to T spaces. - --wrap  - Specify the text-wrapping mode (*auto*, never, character). +SUBCOMMANDS: + cache Modify the syntax-definition and theme cache - -n, --number - Show line numbers (alias for '--style=numbers'). - - --color  When to use colors (*auto*, never, always). - --italic-text  Use italics in output (always, *never*) - --decorations  - When to show the decorations (*auto*, never, always). - - --paging  - Specify when to use the pager, or use `-P` to disable (*auto*, never, - always). - -m, --map-syntax ... - Use the specified syntax for files matching the glob pattern - ('*.cpp:C++'). - --theme  Set the color theme for syntax highlighting. - --list-themes Display all supported highlighting themes. - --style  - Comma-separated list of style elements to display (*auto*, full, plain, - changes, header, grid, rule, numbers, snip). - -r, --line-range ... Only print the lines from N to M. - -L, --list-languages Display all supported languages. - -h, --help Print this help message. - -V, --version Show version information. - -ARGS: - ... File(s) to print / concatenate. Use '-' for standard input. - -SUBCOMMANDS: - cache Modify the syntax-definition and theme cache - -Note: `bat -h` prints a short and concise overview while `bat --help` gives all -details. +Note: `bat -h` prints a short and concise overview while `bat --help` gives all details. diff --git a/tests/syntax-tests/source/cmd-help/test.cmd-help b/tests/syntax-tests/source/cmd-help/test.cmd-help index 7c40925c..196998a3 100644 --- a/tests/syntax-tests/source/cmd-help/test.cmd-help +++ b/tests/syntax-tests/source/cmd-help/test.cmd-help @@ -1,54 +1,43 @@ -bat 0.20.0 (e735562-modified) -A cat(1) clone with syntax highlighting and Git integration. +bat 0.22.1 +A cat(1) clone with wings. + +Use '--help' instead of '-h' to see a more detailed version of the help text. USAGE: bat [OPTIONS] [FILE]... bat -OPTIONS: - -A, --show-all - Show non-printable characters (space, tab, newline, ..). - - -p, --plain Show plain style (alias for '--style=plain'). - -l, --language Set the language for syntax highlighting. - -H, --highlight-line ... Highlight lines N through M. - --file-name ... Specify the name to display for a file. - -d, --diff - Only show lines that have been added/removed/modified. - - --tabs Set the tab width to T spaces. - --wrap - Specify the text-wrapping mode (*auto*, never, character). - - -n, --number - Show line numbers (alias for '--style=numbers'). - - --color When to use colors (*auto*, never, always). - --italic-text Use italics in output (always, *never*) - --decorations - When to show the decorations (*auto*, never, always). - - --paging - Specify when to use the pager, or use `-P` to disable (*auto*, never, - always). - -m, --map-syntax ... - Use the specified syntax for files matching the glob pattern - ('*.cpp:C++'). - --theme Set the color theme for syntax highlighting. - --list-themes Display all supported highlighting themes. - --style - Comma-separated list of style elements to display (*auto*, full, plain, - changes, header, grid, rule, numbers, snip). - -r, --line-range ... Only print the lines from N to M. - -L, --list-languages Display all supported languages. - -h, --help Print this help message. - -V, --version Show version information. - ARGS: ... File(s) to print / concatenate. Use '-' for standard input. +OPTIONS: + -A, --show-all Show non-printable characters (space, tab, newline, ..). + -p, --plain Show plain style (alias for '--style=plain'). + -l, --language Set the language for syntax highlighting. + -H, --highlight-line Highlight lines N through M. + --file-name Specify the name to display for a file. + -d, --diff Only show lines that have been added/removed/modified. + --tabs Set the tab width to T spaces. + --wrap Specify the text-wrapping mode (*auto*, never, character). + -n, --number Show line numbers (alias for '--style=numbers'). + --color When to use colors (*auto*, never, always). + --italic-text Use italics in output (always, *never*) + --decorations When to show the decorations (*auto*, never, always). + --paging Specify when to use the pager, or use `-P` to disable (*auto*, + never, always). + -m, --map-syntax Use the specified syntax for files matching the glob pattern + ('*.cpp:C++'). + --theme Set the color theme for syntax highlighting. + --list-themes Display all supported highlighting themes. + --style Comma-separated list of style elements to display (*default*, + auto, full, plain, changes, header, header-filename, + header-filesize, grid, rule, numbers, snip). + -r, --line-range Only print the lines from N to M. + -L, --list-languages Display all supported languages. + -h, --help Print this help message. + -V, --version Print version information + SUBCOMMANDS: cache Modify the syntax-definition and theme cache -Note: `bat -h` prints a short and concise overview while `bat --help` gives all -details. +Note: `bat -h` prints a short and concise overview while `bat --help` gives all details.