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

Have a positional argument as optional with main command #184

Closed
UnoSD opened this issue May 11, 2023 · 4 comments
Closed

Have a positional argument as optional with main command #184

UnoSD opened this issue May 11, 2023 · 4 comments

Comments

@UnoSD
Copy link

UnoSD commented May 11, 2023

Description

Can you please consider allowing the following:

program subcommand arg1

and

program subcommand arg1 arg2

Repro steps

type CreateArgs =
    | [<First;ExactlyOnce;MainCommand>]Args1 of description : string * username : string
    | [<First;ExactlyOnce;MainCommand>]Args2 of description : string * username : string * length : int

This does not allow multiple MainCommand, but if removed they will need a prefix and won't work just as positional

Expected behavior

Allow multiple positional arguments

Actual behavior

Not allowed

Known workarounds

None

Related information

  • Operating system
    Linux
  • Branch
    Latest NuGet
  • .NET Runtime, CoreCLR or Mono Version
    .NET 7
@UnoSD
Copy link
Author

UnoSD commented May 11, 2023

Apologies, I believe this is quite similar to #85

please let me know if you would like me to close and track the other one if it will fix both.

Thanks

@bartelink
Copy link
Member

@UnoSD I feel this one would best be closed - until there's a clear approach/workaround for #85, there's no point having speculative ideas that are not realistically going to be implemented in the short to medium term

(and re tuples, I can't see good ways to associate help messages with them etc)

Thoughts?

@bartelink
Copy link
Member

related: #107

@UnoSD
Copy link
Author

UnoSD commented Dec 12, 2023

@bartelink I am currently on leave, but I'm happy to have a think when I am back. Closing the issue in the meantime as suggested.

@UnoSD UnoSD closed this as completed Dec 12, 2023
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

2 participants