All Versions
46
Latest Version
Avg Release Cycle
60 days
Latest Release
15 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v3.5.0 Changes
May 11, 2022๐ 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
- cmd/shfmt
-
v3.4.3 Changes
February 19, 2022- 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
- cmd/shfmt
-
v3.4.2 Changes
December 24, 2021- โ The tests no longer assume what locales are installed
- interp
- Keep
PATH
list separators OS-specific to fix a recent regression - Avoid negative elapsed durations in the
time
builtin
- Keep
-
v3.4.1 Changes
November 23, 2021- 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
- syntax
-
v3.4.0 Changes
October 01, 2021๐ This release drops support for Go 1.15, which allows the code to start benefitting from
io/fs
.- cmd/shfmt
- Walks directories ~10% faster thanks to
filepath.WalkDir
- Walks directories ~10% faster thanks to
- syntax
- Add
Quote
to mirrorstrconv.Quote
for shell syntax - Skip null characters when parsing, just like Bash
- Rewrite fuzzers with Go 1.18's native fuzzing
- Add
- fileutil
- Add
CouldBeScript2
usingio/fs.DirEntry
- Add
- expand
- Skip or stop at null characters, just like Bash
- interp
- Set
GID
just likeUID
- Add support for
read -p
- Add support for
pwd
flags - Create random FIFOs for process substitutions more robustly
- Avoid leaking an open file when interpreting
$(<file)
- Set
- cmd/shfmt
-
v3.3.1 Changes
August 01, 2021- syntax
- Don't convert
&
in a separate line into;
- Fix a
BinaryNextLine
edge case idempotency bug - Never start printing a command with an escaped newline
- Don't convert
- interp
- Support calling
Runner.Reset
beforeRunner.Run
- Obey
set -e
for failed redirections
- Support calling
- syntax
-
v3.3.0 Changes
May 17, 2021- cmd/shfmt
- Document the
FORCE_COLOR
env var to always use colors in diffs
- Document the
- syntax
- Add the printer
SingleLine
option to avoid printing newlines - Positions now use more bits for line numbers than column numbers
- Test operators like
&&
and||
no longer escape newlines - Properly handle closing backquotes in a few edge cases
- Properly handle trailing escaped newlines in heredocs
- Add the printer
- interp
- Redesigned variable scoping to fix a number of edge cases
- Refactor
set -o nounset
support to fix many edge cases - Deprecate
LookPath
in favor ofLookPathDir
- Array element words are now expanded correctly
- Add support for
trap
with error and exit signals - Add support for
shopt -s nullglob
- Add support for
type -p
- cmd/shfmt
-
v3.2.4 Changes
March 08, 2021- cmd/shfmt
- Don't stop handling arguments when one results in a failure
- expand
- Don't panic when a backslash is followed by EOF
- cmd/shfmt
-
v3.2.2 Changes
January 29, 2021- syntax
- Avoid comment position panic in the printer
- syntax
-
v3.2.1 Changes
December 02, 2020Highlights:
- syntax
- Fix an endless loop when parsing single quotes in parameter expansions
- Properly print assignments using escaped newlines
- Print inline heredoc comments in the right place
- interp
- Always expand
~
in Bash test expressions
- Always expand
- expand
- Don't panic on out of bounds array index expansions
๐ง Binaries built on
go version go1.15.5 linux/amd64
via a shell script.๐ Consider becoming a sponsor if you benefit from the work that went into this release!
- syntax