Skip to content

Conversation

@khaled4vokalz
Copy link

What

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:

$ 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 #1088

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
@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @khaled4vokalz to sign the Salesforce Inc. Contributor License Agreement.

@khaled4vokalz
Copy link
Author

Thanks for the contribution! Before we can merge this, we need @khaled4vokalz to sign the Salesforce Inc. Contributor License Agreement.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support showing flag aliases in the auto complete output

1 participant