-
Notifications
You must be signed in to change notification settings - Fork 2
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
Customize array flag functionality #17
Comments
@infinitepr0 I can only think of specifying the flag multiple times |
What about something like
I don't think this is widely used, so I guess it would be better to not create a non-conventional method. |
@infinitepr0 For what it's worth. I'm still thinking about this. If I think of something elegant, I'll be sure to revisit this. |
Fwiw the I've never come across a CLI tool that expects multiple inputs and multiple outputs. Take |
@hoshsadiq I agree. This CSV parsing causing more trouble than it's worth. I'm not sure ripping it out would work out for the cobra users though. Might be worth investigating. In fact, another issue was submitted upstream that relates to this. |
Take a program that takes input of the following form:
Now, the flags can be achieved using
.Flags().StringSlice(...)
which would take the input in format:However, imagine there were many (say 100) matching input and output files. Using tab completion lists all files, but uses a space to seperate them (instead of a comma, that pflag uses).
So, my question is, is there any way to achieve the above, without writing platform dependent shell scripts?
The text was updated successfully, but these errors were encountered: