-
Notifications
You must be signed in to change notification settings - Fork 203
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
Track IFS with file-format flags at CLI parse (was: file format flags are not overriding mlrrc) #1340
Comments
If I run
I have
But I'm using mlr 6.7.0 |
What is your mlrrc? |
And I have the same using 6.8.
I do not use it |
Ok, then that explains why you don't have the same error. Now try setting your mlrrc to match mine. |
the same error |
Hi @holmescharles and thanks for the issue! I looked into this and it's not quite what any of us thought. And unfortunately I think you may not like the answer! :) And neither do I ... 😉 When But what happens is This isn't a
So: a fix could be that This is a bigger issue and it goes back all the way to Miller 1 and involves the fact that these flags are overlapping. So
or
-- and Miller has always had that flexibility, and I don't want to take it away. I think it would break a lot of things for a lot of people, to change it now. So ...... I think the best that can be done at present is this suggestion:
with the explicit I wish I had a better answer, but, at this point in time, and given the long-standing usage pattern above, I don't see a better option. Later thought: I thought there may be a way to accommodate this but I'm still unsure. Namely:
|
Maybe I'm thinking about this incorrectly, but could you keep track of the give format flag and wait until the end to use that to set things like IFS etc? That way, if the user specifies something else, it waits until the last minute to assign unassigned variables? I'm not sure how things are implemented, but this could just be tracked in some new variable? Then, if you specify --pprint before --csv, it will completely ignore pprint. Alternatively, pprint is just csv with "contiguous whitespace" as delimiters. For my own curiosity, how would you specify contiguous whitespace as IFS? |
Yes, you & I are talking about the same thing -- what you just wrote, and my bullet list above. So
Not quite. |
I am using miller 6.8.0 on OSX. Here is my mlrrc:
When I run the following command, I get the following error:
As you can see, miller is defaulting to pprint even though I passed "--csv". It is interpreting spaces as the delimiter, not the commas.
Next, I change my mlrrc to:
Now I can run the previous command with no issue:
According to the documentation, miller is supposed to override any file formats in the mlrrc when options are passed in the terminal, but this is not happening.
The text was updated successfully, but these errors were encountered: