Fix --indent 0 implicitly enabling compact-output#2256
Fix --indent 0 implicitly enabling compact-output#2256amarshall wants to merge 1 commit intojqlang:masterfrom
--indent 0 implicitly enabling compact-output#2256Conversation
|
@itchyny I would argue this is a bug fix, not a feature request. The manpage doesn’t document the prior behavior, and |
|
Okay, rebase this PR, please. Also tests are needed. |
|
Hmm, how do I approve the actions to run on this PR? |
|
@nicowilliams i'm guessing it needs a new push to run |
Now it will retain pretty-printing, just remove any indentation.
bedc1ff to
c2a24f2
Compare
|
Seems to break $ ./jq --indent 0 -n '[{a:1}]'
[
{
"a": 1
}
]
$ ./jq --indent 1 -n '[{a:1}]'
[{"a":1}]
$ ./jq --indent 2 -n '[{a:1}]'
[
{
"a": 1
}
]Maybe this is also an indication we should have some tests for indent/compact flags? |
|
Hello, I've created a pr #3202 with tests regarding this pull request. |
I don't reproduce the issue. Seems working. BTW |
Now it will retain pretty-printing, just removing any indentation. Fixes #1465 and fixes #2498.