feat(inquirerer): add alias support for questions #43
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.
feat(inquirerer): add alias support for questions
Summary
Adds the ability to define aliases for CLI questions, allowing users to use short flags like
-winstead of--workspace. This enables defining questions like:Changes:
alias?: string | string[]property toBaseQuestioninterfaceexpandAliases()method that maps alias keys to question names before processing(--workspace, -w)Review & Testing Checklist for Human
expandAliases()correctly prioritizes the main name over aliases when both are provided-, multi-char gets--)Recommended Test Plan
pnpm testinpackages/inquirererto verify all 131 tests pass-wand--workspacework whenalias: 'w'is setNotes
pgpm init --createWorkspaceto use--workspacewith-walias in the constructive repo (separate PR)Link to Devin run: https://app.devin.ai/sessions/9b39745595e74f3782f1a79ead7a6db0
Requested by: Dan Lynch (@pyramation)