shfmt

shfmt 3.14.1

Format shell programs

  • By Daniel Martí
  • Open Source
  • Updated Sep 6, 2026
Download for Windows

About shfmt

Format shell programs

What's new in 3.14.1

  • syntax
  • Fix the indentation of heredocs nested inside command substitutions - #1403
  • Keep literal tabs in <<- heredoc bodies rather than replacing them with spaces
  • Don't indent heredocs without dashes nested in <<- ones, whose output no longer parsed
  • Zsh: don't drop the prefix in short forms like $#"$foo" and $+"$foo" - #1405
  • interp
  • Fix the build on 32-bit FreeBSD and NetBSD
  • expand
  • Don't let escaped characters such as \* act as glob metacharacters
  • pattern
  • Treat unclosed extended operator groups like @(a as literals, avoiding a panic

Full release notes »

Technical details

PublisherDaniel Martí
Version3.14.1
Release date2026-09-06
LicenseBSD-3-Clause
Installer typeportable
Architecturex86, x64
Package IDmvdan.shfmt

Links & install command

Install shfmt from the command line with Windows Package Manager (winget):

winget install --id=mvdan.shfmt -e

bashbeautifyformatformattershell

Older versions

  • 3.14.0
  • 3.13.1
  • 3.13.0
  • 3.12.0
  • 3.11.0
  • 3.10.0
  • 3.9.0
  • 3.8.0
  • 3.7.0