Skip to content
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

--quote-all silently ignored #1026

Closed
dimitri-lenkov opened this issue May 21, 2022 · 4 comments
Closed

--quote-all silently ignored #1026

dimitri-lenkov opened this issue May 21, 2022 · 4 comments

Comments

@dimitri-lenkov
Copy link

The latest version of mlr broke a script of mine and was wondering if there is a new flag for this, or if I should be using a different tool for this use case (I need quoted CSV output).

I've narrowed down my problem to this flag (I think):

this1

Previous versions of mlr would output the following:

λ echo "test,foo" | mlr --csv --quote-all -N unsparsify
"test","foo"

And now that the --quote-all flag is ignored, I get this output instead:

λ echo "test,foo" | mlr --csv --quote-all -N unsparsify
test,foo

In the docs:

https://miller.readthedocs.io/en/latest/reference-main-flag-list/#legacy-flags

It states at the top of that section:

They are accepted as no-op flags in order to keep old scripts from breaking.

But it did break my script, just in a confusing way lol. My use-case is updating a configuration file that only accepts quoted CSV data.

Thanks for the project & any advice ✌️

@dimitri-lenkov
Copy link
Author

dimitri-lenkov commented May 21, 2022

I'm just patching my script like this in the meantime:

λ echo 'test,foo' | mlr --c2t -N unsparsify | xargs -I{} echo '"{}"' | sed 's/\t/\",\"/g'
"test","foo"

@aborruso
Copy link
Contributor

Another solution, is to have in you PC both version 5 & 6, and then use the 5 for this part of your workflow

echo 'test,foo' | mlr5 --csv --quote-all -N unsparsify

@johnkerl
Copy link
Owner

johnkerl commented Jun 3, 2022

Hi @dimitri-lenkov and sorry for the disruption! :(

Let me look into this -- I'm using the Go CSV library now in Miller 6 where I don't have as many 'knobs' to turn as I used to. There may be a good way to handle this, though ...

@johnkerl
Copy link
Owner

@dimitri-lenkov restored in #1084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants