A shell parser, formatter, and interpreter with bash support; includes shfmt
This release drops support for Go 1.19 and 1.20 and includes many features and bugfixes, such as improving EditorConfig support in shfmt
.
[[shell]]
- #664--apply-ignore
for tools and editors - #1037function
in POSIX mode - #993unix.Access
- #1033FuncEnviron
as Env
- #1043fs.DirEntry
via ReadDirHandler2
fs.DirEntry
via ReadDir2
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"
This release drops support for Go 1.18 and includes many features and fixes.
$foo#bar
as a single word - #1003&>
redirect operators an error in POSIX mode - #991${foo:-}
into ${foo-}
- #970ExecHandlers
to support layering multiple middlewares - #964select
clause - #969errexit
and pipefail
options - #870EUID
just like UID
- #958js/wasm
- #983reflect.Value.MethodByName
to reduce binary sizes - #961A 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"
This release drops support for Go 1.17 and includes many features and fixes.
echo *
- #835
${name:-}
to the equivalent ${name-}
- #849
<<<
is used in POSIX mode - #881
${!foo*}
and ${!foo@}
in mksh mode - #929
--from-json
and --to-json
as Go APIs - #885
EntireString
to match the entire string using ^$
- #866
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!
This release was tagged two weeks ago; we forgot to do the GitHub release with prebuilt binaries.
Regexp
now returns the typed error SyntaxError
- #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!
This release drops support for Go 1.16 and includes many new features.
-ln=auto
by default to detect the shell language--indent
for -i
@() { ... }
NewPos
to create Pos
values externallyMinify
no longer omits a leading shebang commentShebang
to extract the shell language from a #!
line**
globbing for correctnessos.Stat
as the last direct use of the filesystemCallHandler
to intercept all interpreted CallExpr
nodesReadDirHandler
to intercept glob expansion filesystem readsStatHandler
to intercept os.Stat
and os.Lstat
callsset -x
cd -
as cd "$OLDPWD"
set - args
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
tag to track the latest stable versiontest
builtin%w
to wrap errors in Dir
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!
Quote
ListEnviron
to avoid common prefix issuesexport
used in functions now affects the global scope$PATH
in source
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!
Quote
ListEnviron
to avoid common prefix issuesexport
used in functions now affects the global scope$PATH
in source
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!
This release drops support for Go 1.15, which allows the code to start benefitting from io/fs
.
filepath.WalkDir
Quote
to mirror strconv.Quote
for shell syntaxCouldBeScript2
using io/fs.DirEntry
GID
just like UID
read -p
pwd
flags$(<file)
Binaries built on go version go1.17.1 linux/amd64
via a shell script.
Consider becoming a sponsor if you benefit from the work that went into this release!
Highlights:
&
in a separate line into ;
BinaryNextLine
edge case idempotency bugRunner.Reset
before Runner.Run
set -e
for failed redirectionsBinaries built on go version go1.16.6 linux/amd64
via a shell script.
Consider becoming a sponsor if you benefit from the work that went into this release!