-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Add -c short and hide values for --bytes long #48
Conversation
As discussed @sharkdp I have added We could always change However this is the path of least resistance! 🙏 Let me know what you think Here is a screeny: |
Awesome, thank you very much. |
Sorry. Only saw that after merging. Yes, we could also make it visible and have the help text say something like "An alias for -n/--length". |
You are very welcome! Now I'll go make a new PR to make it visible. Up! #50 |
c alias for length and -n
References #46
Usage
Caveats
So this is interesting. There doesn't seem to be a way to pass in multiple shortnames.
You also can't define the same
Arg::with_name("same_name")
twice.potentially seeing if clap would be OK with adding or getting a PR for multiple shortnames would be another option as well
So the closest thing I could get was adding an alias which still means
--
instead of-
.Now one thing that could be done would be to add a new Arg block but that feels repetitive?
https://docs.rs/clap/2.20.0/clap/struct.Arg.html#short
If adding a new
--c
/-c
The diff would look like (from current commit in PR)