Files
vim-ale/shfmt
AJ ONeal 0861ebc8b8 ref(releases.conf): collapse source/owner/repo into single keys
Source type is now inferred from the primary key:
  github_repo = owner/repo   (was source=github + owner + repo)
  git_url = https://...      (was source=gittag + url)
  gitea_repo = owner/repo    (was source=gitea + owner + repo)
  hashicorp_product = name   (was source=hashicorp + product)

One-off dist sources (nodedist, zigdist, etc.) keep the explicit
source= key since they're already one-liners.

Parser still accepts the old format via the default fallback branch.
2026-03-11 01:05:08 -06:00
..
2026-03-08 19:38:49 -06:00

title, homepage, tagline
title homepage tagline
shfmt https://github.com/mvdan/sh shfmt: Format shell programs

To update or switch versions, run webi shfmt@stable or webi shfmt@beta, etc.

Files

These are the files / directories that are created and/or modified with this install:

~/.config/envman/PATH.env
~/.local/opt/shfmt/
~/.local/bin/shfmt

Cheat Sheet

shfmt is a shell parser, formatter and interpretter that supports POSIX Shell, Bash and mksh.

Usage: shfmt <flags> <filepath>

Note: If given path is directory, all shell scripts in the directory will be used.

Frequently used flags:

-version
	Show version and exit.

-l
	List files whose formatting differs from shfmt's.

-w
	Write result to file instead of stdout.

-d
	Error with a diff when the formatting differs.

-s
	Simplify the code.

-f
	Recursively find all shell files and print the paths.

Examples

To list files being formatted and write directly to file

shfmt -l -w <filepath>

To show differences between shfmt formatting and original file formatting

shfmt -d <filepath>

See https://github.com/mvdan/sh for more info.