better fish completions#2275
better fish completions#2275Enselic merged 4 commits intosharkdp:masterfrom zgracem:better-fish-completions
Conversation
This will cause vim (and other properly-extended editors) to read this as a fish script file, despite its .fish.in extension.
|
Looks reasonable, so I am tempted to blindly merge this. Ideally, all important aspects of fish completions should have automated tests, because manually testing stuff is not manageable in the long term. Until we have tests, I think blindly merging stuff that looks reasonable is not unreasonable. I'll leave this comment here for a while to give other maintainers a chance to object if they want. @keith-hall You seemed to enjoy the change, so what do you think about blindly merging? We should add an entry to CHANGELOG.md though. |
|
I had the same thoughts regarding automated tests, but this change is described well enough (and looks manually tested enough by the author) that I'd be okay with blindly merging it. Worst case outcome, if something breaks, it's only fish completions ;) |
|
Sounds good, thanks for the input! @zgracem Can you add an entry to CHANGELOG.md please? After that we can merge this PR |
All done! |
|
Thank you! |
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: