-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
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
Ability to alias arguments #669
Comments
I wonder if someone is doing this work already.. 🤔 cc/ @kbknapp |
afiune
pushed a commit
to afiune/clap-rs
that referenced
this issue
Sep 30, 2016
There are some cases where you need to have an argument to have an alias, an example could be when you depricate one option in favor of another one. Now you are going to be able to alias arguments as follows: ``` Arg::with_name("opt") .long("opt") .short("o") .takes_value(true) .alias("invisible") .visible_alias("visible") ``` Closes clap-rs#669
afiune
pushed a commit
to afiune/clap-rs
that referenced
this issue
Oct 4, 2016
There are some cases where you need to have an argument to have an alias, an example could be when you depricate one option in favor of another one. Now you are going to be able to alias arguments as follows: ``` Arg::with_name("opt") .long("opt") .short("o") .takes_value(true) .alias("invisible") .visible_alias("visible") ``` Closes clap-rs#669
homu
added a commit
that referenced
this issue
Oct 4, 2016
feat(arg_aliases): Ability to alias arguments There are some cases where you need to have an argument to have an alias, an example could be when you deprecate one option in favor of another one. Now you are going to be able to alias arguments as follows: ```rust Arg::with_name("opt") .long("opt") .short("o") .takes_value(true) .alias("invisible") .visible_alias("visible") ``` Closes #669 Also you can alias flags as follow: ```rust Arg::with_name("flg") .long("flag") .short("f") .alias("not_visible_flag") .visible_alias("awesome_v_flag") ```
homu
added a commit
that referenced
this issue
Oct 4, 2016
feat(arg_aliases): Ability to alias arguments There are some cases where you need to have an argument to have an alias, an example could be when you deprecate one option in favor of another one. Now you are going to be able to alias arguments as follows: ```rust Arg::with_name("opt") .long("opt") .short("o") .takes_value(true) .alias("invisible") .visible_alias("visible") ``` Closes #669 Also you can alias flags as follow: ```rust Arg::with_name("flg") .long("flag") .short("f") .alias("not_visible_flag") .visible_alias("awesome_v_flag") ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is possible to provide (hidden) aliases for subcommands currently, but not for regular arguments. When you have a program that needs to rename an argument it would be useful to have the ability to provide hidden aliases for it.
The text was updated successfully, but these errors were encountered: