-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix --indent 0
implicitly enabling compact-output
#2256
base: master
Are you sure you want to change the base?
Conversation
@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. |
Now it will retain pretty-printing, just removing any indentation. See also #1465.