-
Notifications
You must be signed in to change notification settings - Fork 79
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
Option repetition (mostly for verbosity 'levels') ? #38
Comments
Just wanted to clarify how I imagined this might look like:
I'm thinking all it would have to do is set a count of how many v's were supplied. Then the user of your library can do whatever they need to, given that count? I haven't dug through the code too much yet, so I'm not sure if it would require a lot of refactor to implement something like this or not. |
I agree, that's a useful feature I've desired as well. I've seen it used in other libs, I believe maybe mongo or some other popular cli that escapes me at the moment. |
No easy support for it currently, but agree it is a worth while feature. Labeling as such. |
Cool! Hey I was inspired and bored, so I made my own (more of a rough draft) heavily inspired by your library. https://github.com/kevinquinnyo/Optopus In fact I downright stole your method chaining slickness. This one is missing a lot of cool things you have, but it does have the framework in place for the |
This was implemented in GetOptionKit. FYI: https://github.com/c9s/GetOptionKit/wiki/Defining-Options#incremental-flag |
Is there a clean way to implement this using the existing code? Or would it need to be a new feature?
Think ssh -v[vvvvvv...] (incrementing levels of verbosity if the option is repeated)
Note that with
ssh
, it functions the same with:ssh -v -v -v -v example.com
andssh -vvvv example.com
I don't recall ever seeing this type of "option repetition" used with anything other than verbosity levels, and I'm not sure if that's even a GNU utility psuedo-standard, or if it's just specific to
ssh
and a few other oddball utilities, but it is handy. I'd actually like to use that for a project I'm building, using your Commando library that wraps aroundssh
, and would like to provide the same -v[vvv...] functionality if possible. Ideas?I love your work on this by the way -- great library.
The text was updated successfully, but these errors were encountered: