Releases: mvdan/sh
v3.10.0
- cmd/shfmt
- syntax
- interp
Consider becoming a sponsor if you benefit from the work that went into this release!
Binaries built on go version go1.23.2 linux/amd64
with:
CGO_ENABLED=0 go build -trimpath -ldflags="-w -s -X=main.version=v3.10.0"
v3.9.0
This release drops support for Go 1.21 and includes many fixes.
- cmd/shfmt
- Switch the diff implementation to remove one dependency
- syntax
- Protect against overflows in position offset integers
- interp
- Use
os.Pipe
for stdin to prevent draining by subprocesses - #1085 - Support cancelling reads in builtins when stdin is a file - #1066
- Support the
nocaseglob
bash option - #1073 - Support the Bash 5.2
@k
parameter expansion operator - Support the
test -O
andtest -G
operators on non-Windows - #1080 - Support the
read -s
builtin flag - #1063
- Use
- expand
A special thanks to @theclapp for their contributors to this release!
Consider becoming a sponsor if you benefit from the work that went into this release!
Binaries built on go version go1.23.0 linux/amd64
with:
CGO_ENABLED=0 go build -trimpath -ldflags="-w -s -X=main.version=v3.9.0"
v3.8.0
This release drops support for Go 1.19 and 1.20 and includes many features and bugfixes, such as improving EditorConfig support in shfmt
.
- cmd/shfmt
- syntax
- interp
- expand
- Add support for
fs.DirEntry
viaReadDir2
- Support zero-padding in brace expansions - #1042
- Add support for
A special thanks to all the contributors to this release! @theclapp @slabstone @MaienM
Consider becoming a sponsor if you benefit from the work that went into this release!
Binaries built on go version go1.22.0 linux/amd64
with:
CGO_ENABLED=0 go build -trimpath -ldflags="-w -s -X=main.version=v3.8.0"
v3.7.0
This release drops support for Go 1.18 and includes many features and fixes.
- syntax
- interp
- Add
ExecHandlers
to support layering multiple middlewares - #964 - Add initial support for the
select
clause - #969 - Support combining the
errexit
andpipefail
options - #870 - Set
EUID
just likeUID
- #958 - Replace panics on unimplemented builtins with errors - #999
- Tweak build tags to support building for
js/wasm
- #983
- Add
- syntax/typedjson
- Avoid
reflect.Value.MethodByName
to reduce binary sizes - #961
- Avoid
A special thanks to all the contributors to this release! @riacataquian @anderbubble @teefill @diamondburned
Consider becoming a sponsor if you benefit from the work that went into this release!
Binaries built on go version go1.20.5 linux/amd64
with:
CGO_ENABLED=0 go build -trimpath -ldflags="-w -s -X=main.version=v3.7.0"
v3.6.0
This release drops support for Go 1.17 and includes many features and fixes.
- cmd/shfmt
- syntax
- Don't require peeking two bytes after
echo *
- #835 - Simplify
${name:-}
to the equivalent${name-}
- #849 - Don't print trailing whitespaces on nested subshells - #814
- Don't print extra newlines in some case clauses - #779
- Don't indent comments preceding case clause items - #917
- Allow escaped newlines before unquoted words again - #873
- Parse a redirections edge case without spaces - #879
- Give a helpful error when
<<<
is used in POSIX mode - #881 - Forbid
${!foo*}
and${!foo@}
in mksh mode - #929 - Batch allocations less aggressively in the parser
- Don't require peeking two bytes after
- syntax/typedjson
- Expose
--from-json
and--to-json
as Go APIs - #885
- Expose
- expand
- interp
- pattern
- Add
EntireString
to match the entire string using^$
- #866
- Add
A special thanks to all the contributors to this release!
@fauust @graf0 @hristiy4n @ihar-orca @lollipopman @mkhl @przmv @reubeno @riacataquian @scop @tmillr
Binaries built on go version go1.19.4 linux/amd64
with:
CGO_ENABLED=0 go build -trimpath -ldflags="-w -s -X=main.version=v3.6.0"
Consider becoming a sponsor if you benefit from the work that went into this release!
v3.5.1
This release was tagged two weeks ago; we forgot to do the GitHub release with prebuilt binaries.
- cmd/shfmt
- Fix the Docker publishing script bug which broke 3.5.0 - #860
- interp
- pattern
Regexp
now returns the typed errorSyntaxError
- #862
Binaries built on go version go1.18.3 linux/amd64
via a shell script.
Consider becoming a sponsor if you benefit from the work that went into this release!
v3.5.0
This release drops support for Go 1.16 and includes many new features.
- cmd/shfmt
- Switch to
-ln=auto
by default to detect the shell language - Add support for long flags, like
--indent
for-i
- Switch to
- syntax
- Allow extglob wildcards as function names like
@() { ... }
- Add support for heredocs surrounded by backquotes
- Add support for backquoted inline comments
- Add
NewPos
to createPos
values externally - Support escaped newlines with CRLF line endings
Minify
no longer omits a leading shebang comment- Avoid printing escaped newlines in non-quoted words
- Fix some printer edge cases where comments weren't properly spaced
- Allow extglob wildcards as function names like
- fileutil
- Add
Shebang
to extract the shell language from a#!
line
- Add
- expand
- Reimplement globstar
**
globbing for correctness - Replace
os.Stat
as the last direct use of the filesystem
- Reimplement globstar
- interp
- Add
CallHandler
to intercept all interpretedCallExpr
nodes - Add
ReadDirHandler
to intercept glob expansion filesystem reads - Add
StatHandler
to interceptos.Stat
andos.Lstat
calls - Always surface exit codes from command substitutions
- Add initial and incomplete support for
set -x
- Add support for
cd -
ascd "$OLDPWD"
- Avoid panic on
set - args
- Add
Binaries built on go version go1.18.2 linux/amd64
via a shell script.
Consider becoming a sponsor if you benefit from the work that went into this release!
v3.4.3
- cmd/shfmt
- New Docker
v3
tag to track the latest stable version - Don't duplicate errors when walking directories
- New Docker
- interp
- Properly handle empty paths in the
test
builtin - Allow unsetting global vars from inside a function again
- Use
%w
to wrap errors inDir
- Properly handle empty paths in the
Binaries built on go version go1.17.7 linux/amd64
via a shell script.
Consider becoming a sponsor if you benefit from the work that went into this release!
v3.4.2
- syntax
- Don't return an empty string on empty input to
Quote
- Don't return an empty string on empty input to
- expand
- Properly sort in
ListEnviron
to avoid common prefix issues
- Properly sort in
- interp
export
used in functions now affects the global scope- Support looking for scripts in
$PATH
insource
- Properly slice arrays in parameter expansions
Binaries built on go version go1.17.5 linux/amd64
via a shell script.
Consider becoming a sponsor if you benefit from the work that went into this release!
v3.4.1
- syntax
- Don't return an empty string on empty input to
Quote
- Don't return an empty string on empty input to
- expand
- Properly sort in
ListEnviron
to avoid common prefix issues
- Properly sort in
- interp
export
used in functions now affects the global scope- Support looking for scripts in
$PATH
insource
- Properly slice arrays in parameter expansions
Binaries built on go version go1.17.3 linux/amd64
via a shell script.
Consider becoming a sponsor if you benefit from the work that went into this release!