Skip to content

--indent 0 omits more than indentations #2498

Closed
@zstadler

Description

@zstadler

Describe the bug

jq --indent 0 behaves like jq --compact-output rather than only omit the indentations.

To Reproduce

jq --indent 0 -n "[1,2]" produces

[1,2]

Expected behavior

I would expect jq --indent 0 to keep lines separated and only avoid adding the indentations.

For example, jq --indent 0 -n "[1,2]" should produce

[
1,
2
]

In other words, jq --indent 0 ... should be equivalent to jq ... | sed 's/^\s*//' on Linux.

Environment:

  • OS and Version: Windows, Linux - WSL
  • jq version 1.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions