-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
v2 feature: Comma separated slice flags #1134
Comments
Sounds like a good feature, we could also make the separator configurable. |
Do you guys need help on this one? I think I could open a PR to add this feature. Seems like it would solve #1097 as well, right? |
@vschettino If you're interested in working on this, you should go ahead and submit a PR! Any help is welcome. |
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else. |
not stale |
This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant. |
This sounds like a great idea 👍🏼 would love to see a PR for this |
Well if there is no PR opened yet on this, I will submit one. |
Actually, this PR #1241 does exactly that. |
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else. |
Closing this as it has become stale. |
bumping this issue as is a very useful feature, with a PR (albeit unmantained) |
I am wondering how to disable it without the flag |
v1 to v2 is expected to have breaking changes. |
commas are normal especially when passing JSON as a value, ex
I would like to send a PR adding
Any objections? |
Not a problem at all. Go ahead . Thanks a lot
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Ruslan ***@***.***>
Sent: Friday, October 7, 2022 4:37:20 PM
To: urfave/cli ***@***.***>
Cc: dearchap ***@***.***>; Comment ***@***.***>
Subject: Re: [urfave/cli] v2 feature: Comma separated slice flags (#1134)
Actually, this PR #1241<#1241> does exactly that. It does not use a CommaSeparated flag but it should not break backwards compatibility.
I am wondering how to disable it without the flag CommaSeparated. I upgraded the package from v1 to v2 and found it broken. Could we provide such a flag for customization?
commas are normal especially when passing JSON as a value, ex
tctl workflow start --input '{ \"Concurrency\": 1, \"Count\": 1}'
I would like to send a PR adding CommaSeparated to
* Slice flags. Default false to keep the current behavior working
* App struct as an option to disable comma separation altogether so that the behavior is consistent throughout the app. Default true to keep the current behavior working
Any objections?
—
Reply to this email directly, view it on GitHub<#1134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAYNLZWH2QRGCNUQUJJWUPTWCCJZBANCNFSM4MZ4KMUA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I am hitting an issue, where I want to pass in Example:
Seems like @feedmeapples was hitting the exact same issue here. @feedmeapples did you ever get a chance to open a PR for that? |
@ina-stoyanova PR #1546 has a fix for this. You can set the string slice separator to something else |
Oh, that's great to see @dearchap! I'll keep an eye out for the latest release in the next few days (I'm pretty sure I can use the branch name until then!) That's great timing :) Thanks for everyone's effort that has gone into it before I jumped in here 🙏🙏🙏 |
@ina-stoyanova @dearchap added one more PR #1582 to actually allow disabling separator completely |
thank you loads @feedmeapples and @dearchap! I'll update to the latest again as soon as I can :) |
Checklist
What problem does this solve?
--foo bar --foo bar2
--foo=bar,bar2
Solution description
CommaSeparated
toStringSliceFlag
,IntSliceFlag
,Int64SliceFlag
andFloat64SliceFlag
that allows comma separation for these flags.Set
is called on them.Describe alternatives you've considered
Although this would be the simplest solution IMO as mentioned in #1118
It could be implemented by adding new Flags that add this behavior.
The text was updated successfully, but these errors were encountered: