Skip to content

Supporting shortcuts like git branch -D some/branch to mean git branch --force --delete some/branch #5528

Answered by epage
jabley asked this question in Q&A
Discussion options

You must be logged in to vote

We had #2836 which was trying to support this, both here and for subcommands but that ran into problems and we stopped that effort.

Allowing a short flag appear twice is an intriguing idea. My biggest concern is dealing with incompatible definitions of the two arguments and the help output (you wouldn't get that -D entry like git)

This can always be implemented manually with a helper unifying -D with -d and -f. You can also declare them as conflicting if need be. I believe this gets all of the user-visible effects you want with a little bit of user logic on your side.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jabley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants