Support aliases for flags#409
Merged
Merged
Conversation
Contributor
Author
|
@alecthomas Sorry for the direct ping, is this functionality something you'd be open to supporting in kong? There's been a few cases where I've wanted to migrate away from an flag name to a better name, but keep backwards compatibility. |
alecthomas
requested changes
Feb 23, 2024
alecthomas
left a comment
Owner
There was a problem hiding this comment.
Apologies for the delay, I somehow missed this PR.
I think adding flag aliases is a great idea, just one change please.
d64b825 to
644b540
Compare
Owner
|
LGTM! Fix up the linting and I'll merge it in, thanks very much for doing this. |
Contributor
Author
|
Done, thanks for the review! |
Fixes alecthomas#303 Aliases are currently only supported for sub-commands, but they're useful for flags as well. E.g., when migrating from an old flag name to a new flag name, while still supporting the old value.
bbf7a66 to
4d8daab
Compare
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.
Fixes #303
Aliases are currently only supported for sub-commands, but they're useful for flags as well. E.g., when migrating from an old flag name to a new flag name, while still supporting the old value.