feat: add flag aliases support to autocomplete completions#1089
Open
khaled4vokalz wants to merge 1 commit intooclif:mainfrom
Open
feat: add flag aliases support to autocomplete completions#1089khaled4vokalz wants to merge 1 commit intooclif:mainfrom
khaled4vokalz wants to merge 1 commit intooclif:mainfrom
Conversation
Flag definitions can include an `aliases` array property that allows alternative names for the same flag (e.g., --no-progress and --noProgress). Previously, only the primary flag name was included in generated autocomplete scripts. This change ensures flag aliases are included in the completion output for all supported shells: - zsh: aliases added to _arguments block - bash: aliases added to the commands list - powershell: aliases added to the flags hashtable Example output from a dummy cli: ```bash $ my-cli app result -<TAB> --bump-dev-version --bumpDevVersion -- Bump dev version before building. --help -- Show help for command --no-progress --noProgress -- Don't display any progress indicators --path -p -- The root directory of the app ``` Closes oclif#1088
|
Thanks for the contribution! Before we can merge this, we need @khaled4vokalz to sign the Salesforce Inc. Contributor License Agreement. |
Author
done |
Author
|
@cristiand391 , any plans with this? Sorry for the push, but It'd be really helpful for some of our use-case we're using oclif for... |
|
This CR duplicates some code and also doesn't take |
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.
What
Flag definitions can include an
aliasesarray property that allows alternative names for the same flag (e.g., --no-progress and --noProgress). Previously, only the primary flag name was included in generated autocomplete scripts.This change ensures flag aliases are included in the completion output for all supported shells:
Example output from a dummy cli:
Closes #1088