3

I've a complex curl command that I want to analyze but it's all minified into one line.

Is there a formatter that would beautify it?

2 Answers 2

1

shell-format can format bash files. Assuming you put that curl command to be part of a bash script, it should work.

Sign up to request clarification or add additional context in comments.

4 Comments

for some reason it keeps saying: not found! please install manual mvdan.cc/sh/cmd/shfmt
Well, did you install the tool?
yes, and i think it didn't properly set path variables. that's a big jump from installing extension to having to install a separate tool and configure path env vars. So im looking for something else if i dont find an extension then ill try again with this.
Most extensions related to formatting rely on external tools, I doubt you'll find one that doesn't.
0
curl http://example.com/api/getPosts | node <<< "var o = $(cat); console.log(JSON.stringify(o, null, 4));" 

Got it from here: https://stackoverflow.com/a/27238477/2159159

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.