Skip to content
🐳 Dockerized "shfmt" 🐚 shell script formatter
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml
Dockerfile
README.md

README.md

shfmt

Build Status Docker Hub pulls Docker image size & layers Docker image version

Docker Hub badge

Dockerized shfmt shell script formatter.

Usage

Command line

Run Docker container using peterdavehello/shfmt image:

docker run --rm -it -v /path/of/scripts:/path/in/docker peterdavehello/shfmt:2.6.4 shfmt --version

Replace --version with the parameters you want, for example:

docker run --rm -it -v "$(pwd)":/scripts peterdavehello/shfmt:2.6.4 shfmt -sr -i 2 -d -ci /scripts

Don't forget to replace 2.6.4 with the latest tag or the tagged version you want.

GitLab CI example

shfmt:
  stage: test
  image: peterdavehello/shfmt:2.6.4
  before_script:
    - shfmt -version
  script:
    - shfmt -sr -i 2 -d -ci .
  tags:
    - docker
You can’t perform that action at this time.