feat: add flag aliases support to autocomplete completions#1089
feat: add flag aliases support to autocomplete completions#1089khaled4vokalz 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. |
done |
|
@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 |
|
Closing and reopening the PR so the CLA updates. |
|
@khaled4vokalz , I'm unable to QA this locally with my own plugins, for some reason. Do you have an example of a plugin with aliased flags that will now work properly because of this PR? |
|
@jfeingold35 , |
|
@jfeingold35 , |
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