I have some 1000 lines shell script with all the kepywords
if/else, while, HERE document
Can anyone tell the best way to format the script, so the script looks good.
I was trying VG= in vim but that displaces HERE document content as well.
check this https://github.com/mvdan/sh, here is the sample command for indent with two spaces
shfmt -i 2 -w yourscript
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With