Format shell script based on Docker.
This is shfmt wrapper.
docker run --rm -v $PWD:/work tmknom/shfmt foo.sh
Use -w to write result to file instead of stdout.
docker run --rm -v $PWD:/work tmknom/shfmt -w **/*.sh
Use -i N to indent with a number of spaces instead of tabs.
Get the formatting appropriate for Google's Shell Style Guide.
docker run --rm -v $PWD:/work tmknom/shfmt -i 2 -ci -w **/*.sh
For details, refer to mvdan/sh.
docker run --rm -v $PWD:/work tmknom/shfmt
build Build docker image
format Format code
help Show help
install Install requirements
lint Lint code
git clone [email protected]:tmknom/shfmt.git
cd shfmt
make install
Automatically deployed by "DockerHub Automated Build" after merge.
Apache 2 Licensed. See LICENSE for full details.
Content type
Image
Digest
Size
1.2 MB
Last updated
over 7 years ago
docker pull tmknom/shfmt