Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Back in 2020, the command-line completions for bat that had been shipping with fish were removed in favour of the completions file that currently ships with bat (see discussion in #651). Unfortunately, the deprecated fish completions had some nifty features that weren't carried over. This PR restores those features and expands upon them.
Improvements vs. the current completions:
always
,auto
) are indicated in the option-completion text, not the description of the option itself.bat cache
.bat --map-syntax <glob pattern>:<language syntax>
.bat --style
.--style
) won't be suggested if a previous option (e.g.--help
) overrides regular output/behaviour.{{PROJECT_EXECUTABLE}}
placeholders have been place-held by the locally-scoped$bat
, for ease of reading and editing.__bat_complete_map_syntax
) are no longer parameterized, but "the other bat" doesn't include shell completions as far as I can tell, so there shouldn't be any collisions.Please let me know if you have any questions!
Before:
After:
bat --italic-text=
before:bat --italic-text=
after:bat --style=
before:bat --style=
after: