Codeformatter / beautifier for bash (on command line)?

We are looking for a format format for command line code that can be used for bash code . It should be customizable and preferably used from the command line.

I have a big project in bash that I need to use for Q. So far, I am pleased with the program written in python by Paul Lutus (a remake of his previous version in Ruby).

See http://arachnoid.com/python/beautify_bash_program.html (also cloned here https://github.com/ewiger/beautify_bash ).

but I would like to explore any serious alternative to this tool, if one exists. Requirements: it must provide a sufficiently high performance and processing / analysis behavior of more complex code.

PS I believe that a complete analysis of bash code is usually difficult because there is no official grammar of the language (but please correct me if I am wrong about this).

+5
source share
2 answers

you can execute vim script: "gg = G" which means "indent the whole file"

+7
source

shfmt . , Bash, , .

, Go, 20- Go .

0

All Articles