←back to thread

700 points yen223 | 1 comments | | HN request time: 0s | source
Show context
gkfasdfasdf ◴[] No.42061451[source]
pbcopy and pbpaste are handy, for a version that works over ssh connections there is osc: https://github.com/theimpostor/osc
replies(4): >>42061773 #>>42064063 #>>42065164 #>>42072500 #
pak9rabid ◴[] No.42065164[source]
At my job I have to work with a lot of JSON that's usually minimized. This command has single-handedly saved my sanity:

$ pbpaste | jq | pbcopy

Then I can paste it into whatever text editor I want and it's all nice & pretty-printed for me.

Bonus is that I don't have to change the command at all, just copy the minimized JSON to the clipboard (say from DBeaver, for example), then hit the 'up' arrow and enter.

replies(1): >>42066850 #
1. mfonda ◴[] No.42066850[source]
I never knew that jq without any arguments pretty-printed JSON. Very useful, and great tip to combine with pbcopy/pbpaste.