Repository navigation
fix(completions): the PowerShell completion offers an invalid --wrap value - #4070
Merged
Merged
Conversation
# Conflicts: # CHANGELOG.md
…ap-auto Signed-off-by: yuwk <[email protected]> # Conflicts: # CHANGELOG.md
agammann
approved these changes
Nov 1, 2026
agammann
left a comment
There was a problem hiding this comment.
I exercised the PowerShell completion on this head. After substituting the executable placeholder, TabExpansion2 for bat --wrap offers auto, character, never, and word. The same check on master offers always instead of auto; the new set matches the four values accepted by the --wrap parser in clap_app.rs. The changelog entry describes the behavior accurately. This fixes the completion mismatch for me.
keith-hall
approved these changes
Nov 2, 2026
keith-hall
enabled auto-merge
November 2, 2026 12:52
cindykrafft
pushed a commit
to cindykrafft/bat
that referenced
this pull request
Nov 2, 2026
Brings in sharkdp#4038, sharkdp#4048 and sharkdp#4070. The merge of sharkdp#4048 re-added the old UTF-16BE CHANGELOG entry with its "#XXXX" placeholder at the top of Bugfixes, so drop that duplicate; the entry this PR corrects to sharkdp#4076 stays. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VVn4SeAXPsUajXT2rtHQfo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The PowerShell completion offers
alwaysfor--wrap, but--wraphas noalwaysmode:src/bin/bat/clap_app.rs:228parses that argument asso tab-completing and accepting the first suggestion gives you
bat: invalid value 'always' for '--wrap <mode>'.autois also what every other place in the repo says: the same file describes the flag as(*auto*, never, character, word)at_bat.ps1.in:143, andbat.bash.in:120,bat.zsh.in:37andbat.fish.in:117-122all listauto never character word.$ArrayWrapis used only for--wrap(_bat.ps1.in:73-74), so nothing else changes.One value fixed.
--wrap=neveris already covered by the--chop-long-linesdescription at line 161, soneverstays where it is.Per CONTRIBUTING, no changelog entry: this is a completion-script description typo, not a change to
bat's behaviour — therequire-changelog-for-PRsworkflow will complain and can be disregarded as described in CONTRIBUTING.md:26-30. Happy to add an entry under Bugfixes if you'd rather have one.AI assistance: an AI assistant helped spot the mismatch and draft this text; I verified each cited line myself and the change is one string in a completion file.
I could not exercise the completion here (no cargo build, no pwsh in this environment), so the fix is verified by source comparison only.