Replies: 1 comment 2 replies
-
No, this can't be done in decline, sorry! Options can have at most one
argument.
I know that some other option parsers allow this (scallop, python's
optparse) but decline hews pretty close to the unix standards which don't
have anything similar. I appreciate that this can make porting existing
CLIs more annoying!
The usual pattern in unix / decline is to either use a single option with a
separator, or two different options. Either of those feel like they might
work for your case?
…On Fri, Jan 27, 2023 at 15:32 lm-dt ***@***.***> wrote:
I'm trying to migrate an existing program to decline, and I have an option
that takes two arguments like this:
--at filename data
Can this be achieved in decline? I've been able to get it to accept it as filename
data using .tupled to make an Opt[(String, String)], but this doesn't
give me any sort of Argument[(String, String)] that I could use with
Opts.option. This is my first time using decline, so I could be missing
something obvious.
—
Reply to this email directly, view it on GitHub
<#484>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMFXM2APJ4OM2ATGOLQPVDWUQWHLANCNFSM6AAAAAAUJDYPXQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to migrate an existing program to decline, and I have an option that takes two arguments like this:
--at filename data
Can this be achieved in decline? I've been able to get it to accept it as
filename data
using.tupled
to make anOpt[(String, String)]
, but this doesn't give me any sort ofArgument[(String, String)]
that I could use withOpts.option
. This is my first time using decline, so I could be missing something obvious.Beta Was this translation helpful? Give feedback.
All reactions