Some complete usability improvements#7321
Closed
faho wants to merge 5 commits into
Closed
Conversation
Currently only `complete` will list completions, and it will list all of them. That's a bit ridiculous, especially since `complete -c foo` just does nothing. So just make `complete -c foo` list all the completions for `foo`.
Currently, completions have to be specified like ```fish complete -c foo -l opt ``` while ```fish complete foo -l opt ``` just complains about there being too many arguments. That's kinda useless, so we just assume if there is one left-over argument that it's meant to be the command. Theoretically we could also use *all* the arguments as commands to complete, but that seems unlikely to be what the user wants. (I don't think multi-command completions really happen)
These have been removed for ages, the complete docs are too verbose as it is.
A bit stuffy, some weird bits (I don't think GNU-style long options can typically be abbreviated, ``true --v`` and ``bash --hel`` don't work).
Member
Author
3 tasks
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.
Description
This fixes a few of
completes usage warts.-c commandas the first two arguments. This makes the-coptional, if there is one non-option argument it's used as the commandcomplete -c commandwithout any other options now lists just the (loaded) completions for that commandTODOs: