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 git@github.com:tmknom/shfmt.git
cd shfmt
make install
Automatically deployed by "DockerHub Automated Build" after merge.
- GitHub - Version Control System
- CircleCI - Continuous Integration
- Docker Hub - Docker Registry
- MicroBadger - Docker Inspection
Apache 2 Licensed. See LICENSE for full details.