[pull] master from fish-shell:master#272
Merged
Merged
Conversation
Reverts that part of ab397e7546 (fix: filter invalid short option completions, 2026-06-18). While at it, clean up a comment and assertion from eae1683 (Completion: complete argument to last of a group of short options, 2019-09-10).
complete -C"somecmd -xyz" will not suggest any of the short options that are already present. This is old behavior from 149594f (Initial revision, 2005-09-20) ("if( wcschr( arg, nextopt ) != 0 )"). It's questionable, since repeated options may be valid ("ssh -vvv" etc.), and completions should generally err on the side of false positives; but given that short options are usually easy to type, and discovery is not really relevant if they are already on the command line, this seems fine? Not sure. Recently, fab397e (fix: filter invalid short option completions, 2026-06-18) made two changes: 1. "complete somecmd -s X -n false; complete -C'somecmd -X'" no longer prints completions. This is a bug fix that reduces confusion. 2. complete -C"somecmd -YY" where "Y" no longer completes other short options because we treat repetition as error. But it's not necessarily, and hiding unrelated completions seems wrong. Revert change 2. See #12821 (comment)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )