Skip to content

Commit

Permalink
Merge pull request #2419 from victor-gp/bump-cmd-help-syntax-9b25682
Browse files Browse the repository at this point in the history
Bump cmd-help syntax to 9b25682
  • Loading branch information
sharkdp committed Dec 7, 2022
2 parents 41ca247 + 3ffa7ed commit e19bebc
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 94 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion assets/syntaxes/02_Extra/cmd-help
Submodule cmd-help updated 184 files
89 changes: 39 additions & 50 deletions tests/syntax-tests/highlighted/cmd-help/test.cmd-help
Original file line number Diff line number Diff line change
@@ -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 <SUBCOMMAND>

OPTIONS:
 -A, --show-all
 Show non-printable characters (space, tab, newline, ..).

 -p, --plain Show plain style (alias for '--style=plain').
 -l, --language <language> Set the language for syntax highlighting.
 -H, --highlight-line <N:M>... Highlight lines N through M.
 --file-name <name>... Specify the name to display for a file.
 -d, --diff
 Only show lines that have been added/removed/modified.

 --tabs <T> Set the tab width to T spaces.
 --wrap <mode>
 Specify the text-wrapping mode (*auto*, never, character).

 -n, --number
 Show line numbers (alias for '--style=numbers').

 --color <when> When to use colors (*auto*, never, always).
 --italic-text <when> Use italics in output (always, *never*)
 --decorations <when>
 When to show the decorations (*auto*, never, always).

 --paging <when>
 Specify when to use the pager, or use `-P` to disable (*auto*, never,
 always).
 -m, --map-syntax <glob:syntax>...
 Use the specified syntax for files matching the glob pattern
 ('*.cpp:C++').
 --theme <theme> Set the color theme for syntax highlighting.
 --list-themes Display all supported highlighting themes.
 --style <components>
 Comma-separated list of style elements to display (*auto*, full, plain,
 changes, header, grid, rule, numbers, snip).
 -r, --line-range <N:M>... 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>... 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.
ARGS:
 <FILE>... 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 <language> Set the language for syntax highlighting.
 -H, --highlight-line <N:M> Highlight lines N through M.
 --file-name <name> Specify the name to display for a file.
 -d, --diff Only show lines that have been added/removed/modified.
 --tabs <T> Set the tab width to T spaces.
 --wrap <mode> Specify the text-wrapping mode (*auto*, never, character).
 -n, --number Show line numbers (alias for '--style=numbers').
 --color <when> When to use colors (*auto*, never, always).
 --italic-text <when> Use italics in output (always, *never*)
 --decorations <when> When to show the decorations (*auto*, never, always).
 --paging <when> Specify when to use the pager, or use `-P` to disable (*auto*,
 never, always).
 -m, --map-syntax <glob:syntax> Use the specified syntax for files matching the glob pattern
 ('*.cpp:C++').
 --theme <theme> Set the color theme for syntax highlighting.
 --list-themes Display all supported highlighting themes.
 --style <components> 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 <N:M> 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.
75 changes: 32 additions & 43 deletions tests/syntax-tests/source/cmd-help/test.cmd-help
Original file line number Diff line number Diff line change
@@ -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 <SUBCOMMAND>

OPTIONS:
-A, --show-all
Show non-printable characters (space, tab, newline, ..).

-p, --plain Show plain style (alias for '--style=plain').
-l, --language <language> Set the language for syntax highlighting.
-H, --highlight-line <N:M>... Highlight lines N through M.
--file-name <name>... Specify the name to display for a file.
-d, --diff
Only show lines that have been added/removed/modified.

--tabs <T> Set the tab width to T spaces.
--wrap <mode>
Specify the text-wrapping mode (*auto*, never, character).

-n, --number
Show line numbers (alias for '--style=numbers').

--color <when> When to use colors (*auto*, never, always).
--italic-text <when> Use italics in output (always, *never*)
--decorations <when>
When to show the decorations (*auto*, never, always).

--paging <when>
Specify when to use the pager, or use `-P` to disable (*auto*, never,
always).
-m, --map-syntax <glob:syntax>...
Use the specified syntax for files matching the glob pattern
('*.cpp:C++').
--theme <theme> Set the color theme for syntax highlighting.
--list-themes Display all supported highlighting themes.
--style <components>
Comma-separated list of style elements to display (*auto*, full, plain,
changes, header, grid, rule, numbers, snip).
-r, --line-range <N:M>... 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>... 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 <language> Set the language for syntax highlighting.
-H, --highlight-line <N:M> Highlight lines N through M.
--file-name <name> Specify the name to display for a file.
-d, --diff Only show lines that have been added/removed/modified.
--tabs <T> Set the tab width to T spaces.
--wrap <mode> Specify the text-wrapping mode (*auto*, never, character).
-n, --number Show line numbers (alias for '--style=numbers').
--color <when> When to use colors (*auto*, never, always).
--italic-text <when> Use italics in output (always, *never*)
--decorations <when> When to show the decorations (*auto*, never, always).
--paging <when> Specify when to use the pager, or use `-P` to disable (*auto*,
never, always).
-m, --map-syntax <glob:syntax> Use the specified syntax for files matching the glob pattern
('*.cpp:C++').
--theme <theme> Set the color theme for syntax highlighting.
--list-themes Display all supported highlighting themes.
--style <components> 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 <N:M> 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.

0 comments on commit e19bebc

Please sign in to comment.