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

Prettyprinter seems to omit some newlines when to a tty #2290

Open
thatch opened this issue Feb 13, 2025 · 0 comments
Open

Prettyprinter seems to omit some newlines when to a tty #2290

thatch opened this issue Feb 13, 2025 · 0 comments
Labels

Comments

@thatch
Copy link

thatch commented Feb 13, 2025

Describe the bug

Missing newlines, perhaps before explicit map keys. When to a pipe, this works and produces valid yaml, but to a tty, not.

Version of yq: v4.45.1
Operating system: mac
Installed via: homebrew

Command
The command you ran:

$ echo -e '{}:\n{x}:\n[x]:'
{}:
{x}:
[x]:
$ echo -e '{}:\n{x}:\n[x]:' | yq . | cat
{}:
? {x: ''}
:
? [x]
:
$ echo -e '{}:\n{x}:\n[x]:' | yq .
{}:? {x: ''}:? [x]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant