-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Handle commas in filenames #1078
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1078 +/- ##
=======================================
Coverage 96.42% 96.43%
=======================================
Files 124 124
Lines 7671 7679 +8
=======================================
+ Hits 7397 7405 +8
Misses 274 274 ☔ View full report in Codecov by Sentry. |
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.
Only small changes required
@Meakk ptal |
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.
Nice workaround, it's a shame we have to do that but I can live with it.
- the `--input` argument is kept but deprecated as it would be a lot of work to make it work with commas - the positional filenames are handled through the unmatched arguments instead of `parse_positional` and commas are ok there would fix #1070
- the `--input` argument is kept but deprecated as it would be a lot of work to make it work with commas - the positional filenames are handled through the unmatched arguments instead of `parse_positional` and commas are ok there would fix f3d-app#1070
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.
Arent we suposed to have a filename visible on this baseline ?
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.
actually, no, I got baited by the name of the test, although displaying the filename in the test would kinda make sense.
For anyone using an older version on *nix, here's a partial work-around. This can be specified as the program to use to open a file when double-clicking on it from one's file manager. It takes a single argument (the file's path). Adjust f3d's command line options to taste within the script as they can't be passed on the command line. Place the script into e.g.
|
This should work around
cxxopts
splitting filenames on commas by retrieving the filenames from the unmatched arguments rather than into avector<string>
option.This comes at the cost of the--input
named argument but I'm unclear if having the filenames as both positional and named args is useful, so hopefully it's fine?TheTestHelpPositional
test fails as, contrary to what its name suggest, it checks for--input
in the help text,Should it have been looking for
file1 file2 ...
this whole time? or should it have been named something likeTestHelpInputArg
in the first place?edit: after @mwestphal request for backward compatibility:
--input
argument is kept but deprecated as it would be a lot of work to make it work with commasparse_positional
and commas are ok therewould fix #1070