Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Pretty print/format JSON lines

Open b-fuze opened this issue 3 years ago • 13 comments

Discord username (optional)

No response

Describe the solution you'd like?

Great work on Warp so far! I thought that it'd be nice if Warp were able to pretty print/format a line of JSON that might be seen as part of some command's log output. Importantly, it should work inline on single lines of output—and not require the full output to be valid JSON—as the log could have JSON output interspersed among other non-JSON output which is common for my use-case.

Is your feature request related to a problem? Please describe.

It's painful to always have to copy a line of JSON output and paste it into a prettifier each time, I'd much prefer if this could be done inline.

Additional context

No response

How important is this feature to you?

2

Warp Internal (ignore) - linear-label:770f6576-d6c0-4e4f-a259-fc64b5156087

None

b-fuze avatar Mar 08 '23 17:03 b-fuze

Thank you for submitting this @b-fuze , we've actually been chatting internally about something like this!

Please :+1: and subscribe to this request as it helps us gauge interest. We will post any updates here.

dannyneira avatar Mar 08 '23 19:03 dannyneira

I would extend this feature to pretty print/format not only JSON but also YAML and other programming language snippets.

Greyvend avatar Mar 21 '23 19:03 Greyvend

In the mean time, there's fx (installable through homebrew/etc.; I'm not the author): https://fx.wtf/ echo '{"yay": {"hey": "wot"}}' | fx

curiositycasualty avatar Jun 26 '23 18:06 curiositycasualty

It would be awesome if Warp detects JSON in a printing log text and automatically format it.

pedrosmmc avatar Jun 30 '23 15:06 pedrosmmc

any updates on this? kind of a blocker for someone who works with JSON on a daily

aviexk avatar Apr 06 '24 13:04 aviexk

fx does the job, but native support would be apreciated

Yalchin403 avatar Apr 22 '24 10:04 Yalchin403

In the mean time, there's fx (installable through homebrew/etc.; I'm not the author): https://fx.wtf/ echo '{"yay": {"hey": "wot"}}' | fx

@curiositycasualty / @Yalchin403, this is kinda neat work around. Any idea how I can pipe logs from JS console.log into fx?

Sowed avatar Apr 24 '24 06:04 Sowed

any updates on this? kind of a blocker for someone who works with JSON on a daily

+1

perez31000 avatar Sep 20 '24 09:09 perez31000

Very nice feature to have

silverwolfdoc avatar Oct 24 '24 10:10 silverwolfdoc

If there is a way to add code/plugin to format my outputs, that would be great. So, we could have full customisation, that could stay on our machine as well.

Chandher05 avatar Nov 14 '24 05:11 Chandher05

Still waiting for this as a plugin in WARP terminal @dannyneira Native support is much desired :)

sagungargs15 avatar Jan 18 '25 07:01 sagungargs15

Still waiting for this as a plugin in WARP terminal @dannyneira Would really love to see this in the warp terminal!

vivekkhyaal avatar Mar 21 '25 08:03 vivekkhyaal

Still waiting for this as a plugin in WARP terminal @dannyneira Would really love to see this in the warp terminal!

unrealrobin avatar Dec 10 '25 22:12 unrealrobin