We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. I often want to set a default set of options to use for a command. For example:
rebase --skip-empty
log --no-pager
This can currently be achieved via an alias, but you cannot alias an existing command to something (eg. log = ["log", "--no-pager"]).
log = ["log", "--no-pager"]
Describe the solution you'd like
[command-defaults.log] pager = false [command-defaults.rebase] skip_empty = true
We'd then simply modify clap to use defaults from a function instead of a static value (which appears to be possible - clap-rs/clap#1634 (comment))
Describe alternatives you've considered Aliasing log to log could work, and might be simpler to implement, but what does the following do:
[aliases] log = ["log", "--no-pager"] log-head = ["log", "@"]
In this scenario, it's unclear whether we should use log --no-pager @ or log @.
log --no-pager @
log @
The text was updated successfully, but these errors were encountered:
This is a duplicate of the closed #1509. See the explanation there, but feel free to comment there (or here) if you think we missed anything.
Sorry, something went wrong.
No branches or pull requests
Is your feature request related to a problem? Please describe.
I often want to set a default set of options to use for a command. For example:
rebase --skip-empty
log --no-pager
(I like paging for diffs but not for logs)This can currently be achieved via an alias, but you cannot alias an existing command to something (eg.
log = ["log", "--no-pager"]
).Describe the solution you'd like
We'd then simply modify clap to use defaults from a function instead of a static value (which appears to be possible - clap-rs/clap#1634 (comment))
Describe alternatives you've considered
Aliasing log to log could work, and might be simpler to implement, but what does the following do:
In this scenario, it's unclear whether we should use
log --no-pager @
orlog @
.The text was updated successfully, but these errors were encountered: