shfmt

Daniel Martí·mvdan.shfmt

Format shell programs

winget install --id mvdan.shfmt --exact --source winget

Latest 3.14.1·September 6, 2026

Release Notes
  • 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

Installer type: portable

x86—B6F171113E7359F44D5FFDC93A90B93A7D405AA8847129A6982E10FE4D356F1E
x64—13629CE28442CA80B6B5A819F7574AB39E1C28C6E26734CA816C9714E04851DF

Details

Homepage
https://github.com/mvdan/sh
License
BSD-3-Clause
Publisher
Daniel Martí
Support
https://github.com/mvdan/sh/issues
Copyright
Copyright (c) 2026, Daniel Martí. All rights reserved.

Tags

bashbeautifyformatformattershell

Older versions (10)

3.14.0
x86—899D0944BB7D81564A72C0AD77ACC2A1D56D5292F0535317E98B2361EBA6AAB3
x64—6738A3E155FBFEC3BEDC70962F9CD1610197587A43B5D7100F405239D8E11375
3.13.1
x86—9B4F368B837FEB883A3B2BF38A46A94DCAB4BCA4B7C3E19F6710E0E09A56CE7C
x64—60CD368533D0AD73FA86D93D5BBF95EF40587245CE684ED138C1B31557B5FE97
3.13.0
x86—F3E32B2A320A3053837ADD32803D7FB3B730D3F10B84A867D327A549EF068FA0
x64—62241AAF6B0CA236F8625D8892784B73FA67AD40BC677A1AD1A64AE395F6A7D5
3.12.0
x86—92C1EF0AF344A10F2CEFE3CE4BC6793AE8B3719AC08FC01802BBD8EAE105E534
x64—C8BDA517BA1C640CE4A715C0FA665439DDBE4357BA5E9B77B0E51E70E2B9C94B
3.11.0
x86—FACFB70DE36CC3B15D59938FD840D6EAA8DC5446767F043265038A49EB719EC7
x64—D11A0880588304496065110CB67CE2375CFCD5433E76DEC505CE1FA21ADF47CC
3.10.0
x86—695D43B600103D8E8BEB7460764F43DA1D679576E67130012507A38238EF7DBD
x64—6E4C6ACD38DE7B4B1BA8F8082B9E688DF8C9B861D3F8B2E7BB1B7270201A3587
3.9.0
x86—61AD0AF789B3ED158F5D593D7EE3301318B7CBA2D84C265D8C30AF0837315F28
x64—4EA136134248AC8EBBF9103370DDCD951B515A9E9BFBA903252F12FD067BB5E9
3.8.0
x86—7BCA75D21D99A256B79DB258C8E6411A99B6F6A990C937663621650CEC95EDE2
x64—91230A6D2D4DBB52E9C0BB134ACBA526F7880BFD3DFD1FFDDE66E9F393D7A646
3.7.0
x86—8BD0422554DD6CE5E07D9D17D020D89254B5C056009005DF824E39A8CBDCF6AA
x64—2807B4AF91FBBD961B68716DE06C044F1B4F897457FC89FBA216E5E2E351C64F
3.6.0
x86—3753ABFACA1BEAF80A81E084C7947E60E2A08076270950D76197F4997FC122D0
x64—18122D910BA434BE366588F37C302C309CDE4CA5403F93285254A3CF96839D01