-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(cast): block -f to accept multiple fields #12427
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
base: master
Are you sure you want to change the base?
Conversation
crates/cast/src/opts.rs
Outdated
| #[arg(short, long,num_args = 1..,action = ArgAction::Append,value_delimiter = ',')] | ||
| fields: Vec<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make sure this is renamed to --field in cast using long = "field" so this is not breaking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make sure this is renamed to
--fieldincastusinglong = "field"so this is not breaking
Pushed the change
grandizzy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix failing tests, thank you
Thanks for letting me know on that, I had the assumption that I shouldn't edit existing test cases, but I have pushed some 2 edited test cases, that were failing due to whitespace. |
Motivation
Resolvs #12385
Solution
Basically I changed it
fieldtofields, type toVec<String>. Then loops over the fields and appends the output to the final std out stream.PR Checklist