Download Latest Version v3.13.1 source code.tar.gz (255.8 kB)
Email in envelope

Get an email when there's a new version of sh

Home / v3.13.0
Name Modified Size InfoDownloads / Week
Parent folder
shfmt_v3.13.0_darwin_amd64 2026-03-09 3.1 MB
shfmt_v3.13.0_darwin_arm64 2026-03-09 3.0 MB
shfmt_v3.13.0_linux_386 2026-03-09 2.9 MB
shfmt_v3.13.0_linux_amd64 2026-03-09 3.1 MB
shfmt_v3.13.0_linux_arm 2026-03-09 3.1 MB
shfmt_v3.13.0_linux_arm64 2026-03-09 3.0 MB
shfmt_v3.13.0_windows_386.exe 2026-03-09 3.1 MB
shfmt_v3.13.0_windows_amd64.exe 2026-03-09 3.3 MB
README.md 2026-03-09 2.1 kB
v3.13.0 source code.tar.gz 2026-03-09 253.5 kB
v3.13.0 source code.zip 2026-03-09 294.7 kB
Totals: 11 Items   25.2 MB 4

This release introduces support for Zsh in the parser and formatter, which was tracked in issue [#120] alongside the label https://github.com/mvdan/sh/labels/zsh. While support is not complete, it should be far enough for many use cases.

This release also drops support for Go 1.24 and includes many other enhancements:

  • cmd/shfmt
  • Exit with a non-zero status when -l prints any filenames
  • shfmt -version is now derived from the git current tag, dropping the -ldflags workaround
  • syntax
  • New nodes types and node fields are introduced alongside LangZsh
  • LangVariant is now a bitset, allowing the use of sets like "Bash-like"
  • Add InteractiveSeq and StmtsSeq iterator methods for Parser
  • Stop exposing the internal buffer in Printer via struct embedding
  • Support the use of brace expansions like declare {a,b}_c=value
  • Fix a bug where POSIX and Bash incorrectly allowed empty command lists
  • interp
  • Add support for shopt -s dotglob and shopt -s extglob
  • Add support for simple uses of !(expr) extended glob patterns
  • Support more builtin flags for declare, type, read
  • Fix various bugs relating to nulls, errors, and arrays
  • expand
  • Add Config.DotGlob and Config.ExtGlob for the interpreter
  • Add Variable.Flags to get the one-character declare flags
  • Do not force env vars on Windows to be uppercase
  • Fix various bugs relating to glob pattern matching
  • pattern
  • Add GlobLeadingDot and ExtendedOperators for the interpreter
  • Add NegExtGlobError to mark the use of !(expr) negation patterns

Consider becoming a sponsor if you benefit from the work that went into this release!

Binaries built on go version go1.26.1 linux/amd64 with:

CGO_ENABLED=0 go build -trimpath -ldflags="-w -s"

Note that this release no longer includes a sha256sums.txt asset; GitHub now provide digests natively.

Source: README.md, updated 2026-03-09