Skip to content
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

[Ftr] Support repetition for flags ? e.g. ansible style verbose: -v / -vv / -vvv #154

Open
ieugen opened this issue Apr 14, 2022 · 1 comment

Comments

@ieugen
Copy link
Contributor

ieugen commented Apr 14, 2022

Is your feature request related to a problem? Please describe.

I would like to implement verbose levels with repetition of the same flag.
Something like it's done in ansible: ANSIBLE_DEBUG=true -vvvv ansible-playbook playbook.yml

Describe the solution you'd like

I would like to build a cli app to have an option for verbose level - with the ability to supply it multiple times:

{:as "Verbose level - multiple versions"
                   :short "v"
                   :option "verbose"
                   :multiple true
                   :type :with-flag}

Describe alternatives you've considered
This is available in tools-cli

["-v" nil "Verbosity level"
    :id :verbosity
    :default 0
    :update-fn inc]

If this is available in the library, I could not find it in the README .

@ieugen
Copy link
Contributor Author

ieugen commented Apr 14, 2022

Related to this case, I think it would be nice to support the :update-fn feature.
I would like to have a way to process (merge) the values of :ednfile for example.
This will get me a single value instead of an array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant