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

DOC: Documentation of passing multiple values in "option" vs "argument" isn't sufficiently explicit #554

Open
1 task done
corneliusroemer opened this issue Feb 14, 2023 · 1 comment · May be fixed by #800
Open
1 task done
Labels
docs Improvements or additions to documentation feature New feature, enhancement or request

Comments

@corneliusroemer
Copy link

Privileged issue

  • I'm @tiangolo or he asked me directly to create an issue here.

Issue Content

I was looking into passing multiple (N>=1, all N >=1 allowed) white space separated values via an option.

This does not seem possible at the moment, but the documentation wasn't very clear. It's only possible to pass an exact number of space separated values via an option, but not a list: https://typer.tiangolo.com/tutorial/multiple-values/options-with-multiple-values/

Multiple values are only possible via argument, yet the documentation for the two types reads almost identical (at least the first few paragraphs): https://typer.tiangolo.com/tutorial/multiple-values/arguments-with-multiple-values/

It would be good to be precise in the first paragraph about the fact that options don't allow you to pass N>=1 values.

Maybe one could accept multiple values by specifying a separator that's not white space, like comma-separated - but that's a feature request in a bit different direction.

@shanilpanara
Copy link

I just encountered this issue too. This is definitely a feature I'd absolutely love to have (white space or comma separated lists)

I'm really not a fan of having to re-write the commands like --command val1 --command val2

Either

--command val1 val2 or --command val1,val2 would be such a big feature for me.

Not sure where to put in a request for this, or if its been stated that it is not going to be implemented!

Thanks so much to all contributers of this repo anyhow, found it a few days ago and switched all my CLI workflows to it almost immediately! Love it!

@svlandeg svlandeg added the docs Improvements or additions to documentation label Mar 15, 2024
@svlandeg svlandeg added the feature New feature, enhancement or request label Mar 29, 2024
@libklein libklein linked a pull request Apr 17, 2024 that will close this issue
3 tasks
@svlandeg svlandeg linked a pull request Apr 18, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation feature New feature, enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants