Changelog History
Page 2
-
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
-
v3.2.0 Changes
October 29, 2020Highlights:
- cmd/shfmt
- Add a man page via scdoc; see shfmt.1.scd
- Add
-filename
to give a name to standard input
- syntax
- Add initial support for Bats
- Protect line and column position numbers against overflows
- Rewrite arithmetic parsing to fix operator precedence
- Don't add parentheses to
function f {...}
declarations for ksh support KeepPadding
now obeys extra indentation when using space indentation- Properly tokenize
((
within test expressions - Properly tokenize single quotes within parameter expansions
- Obey print options inside
<<-
heredocs - Don't simplify indexed parameter expansions in arithmetic expressions
- Improve parsing errors for missing test expressions
LangVariant
now implements flag.Value
- interp
- Avoid panic on C-style loops which omit expressions
$@
and$*
always exist, so"$@"
can expand to zero words
๐ง Binaries built on
go version go1.15.3 linux/amd64
via a shell script.๐ Consider becoming a sponsor if you benefit from the work that went into this release!
- cmd/shfmt
-
v3.1.2 Changes
June 26, 2020Highlights:
- syntax
- Fix brace indentation when using
FunctionNextLine
- Support indirect parameter expansions with transformations
- Stop heredoc bodies only when the entire line matches
- Fix brace indentation when using
- interp
- Make the tests pass on 32-bit platforms
๐ง Binaries built on
go version go1.14.4 linux/amd64
. - syntax
-
v3.1.1 Changes
May 04, 2020Highlights:
- cmd/shfmt
- Recognise
function_next_line
in EditorConfig files
- Recognise
- syntax
- Don't ignore escaped newlines at the end of heredoc bodies
- Improve support for parsing regexes in test expressions
- Count columns for
KeepPadding
in bytes, to better support unicode - Never let
KeepPadding
add spaces right after indentation
- interp
- Hide unset variables when executing programs
๐ง Binaries built on
go version go1.14.2 linux/amd64
. - cmd/shfmt
-
v3.1.0 Changes
April 07, 2020Highlights:
- ๐ Redesigned Docker images, including buildx and an Alpine variant
- cmd/shfmt
- Replace source files atomically when possible
- Support
ignore = true
in an EditorConfig to skip directories - Add
-fn
to place function opening braces on the next line - Improve behavior of
-f
when given non-directories - Docker images and
go get
installs now embed good version information
- syntax
- Add support for nested here-documents
- Allow parsing for loops with braces, present in mksh and Bash
- Expand
CaseClause
to describe itsin
token - Allow empty lines in Bash arrays in the printer
- Support disabling
KeepPadding
- Avoid mis-printing some programs involving
&
- interp
- Add initial support for Bash process substitutions
- Add initial support for aliases
- Fix an edge case where the status code would not be reset
- The exit status code can now reflect being stopped by a signal
test -t
now uses the interpreter's stdin/stdout/stderr files
- expand
- Improve the interaction of
@
and*
with quotes andIFS
- Improve the interaction of
๐ง Binaries built on
go version go1.14.1 linux/amd64
. -
v3.0.2 Changes
February 22, 2020Highlights:
- syntax
- Don't indent after escaped newlines in heredocs
- Don't parse
*[i]=x
as a valid assignment
- interp
- Prevent subshells from defining funcs in the parent shells
- expand
- Parameters to
Fields
no longer get braces expanded in-place
- Parameters to
๐ง Binaries built on
go version go1.13.8 linux/amd64
. - syntax
-
v3.0.1 Changes
January 11, 2020Highlights:
- cmd/shfmt
- Fix an edge case where walking directories could panic
- syntax
- Only do a trailing read in
Parser.Stmts
if we have open heredocs - Ensure comments are never folded into heredocs
- Properly tokenize
)
after a=~
test regexp - Stop parsing a comment at an escaped newline
- Only do a trailing read in
- expand
"$@"
now expands to zero fields when there are zero parameters
๐ง Binaries built on
go version go1.13.5 linux/amd64
. - cmd/shfmt
-
v3.0.0 Changes
June 05, 2019๐ This is the first stable release as a proper module, now under ๐
mvdan.cc/sh/v3/...
. Go 1.12 or later is supported.๐ A large number of changes have been done since the last feature release a year โก๏ธ ago. All users are encouraged to update. Below are the major highlights.
- cmd/shfmt
- Support for EditorConfig files
- Drop the dependency on
diff
for the-d
flag, now using pure Go
- syntax
- Overhaul escaped newlines, now represented as
WordPart
positions - Improve some operator type names, to consistently convey meaning
- Completely remove
StmtList
- Redesign
IfClause
, making its "else" anotherIfClause
node - Redesign
DeclClause
to remove its brokenOpts
field - Brace expression parsing is now done with a
BraceExp
word part - Improve comment alignment in
Printer
via a post-process step - Add support for the
~
bitwise negation operator - Record the use of deprecated tokens in the syntax tree
- Overhaul escaped newlines, now represented as
- interp
- Improve the module API as "handlers", to reduce confusion with Go modules
- Split
LookPath
out ofExecHandler
to allow custom behavior Run
now returnsnil
instead ofShellExitStatus(0)
OpenDevImpls
is removed; seeExampleOpenHandler
for an alternative
- expand
- Redesign
Variable
to reduce allocations - Add support for more escape sequences
- Make
Config
a bit more powerful viafunc
fields - Rework brace expansion via the new
BraceExp
word part
- Redesign
- pattern
- New package for shell pattern matching, extracted from
syntax
- Add support for multiple modes, including filenames and braces
- New package for shell pattern matching, extracted from
๐ Special thanks to Konstantin Kulikov for his contribution to this release.
- cmd/shfmt
-
v3.0.0-beta1 Changes
November 12, 2019๐ This is one of the final pre-releases before v3.0.0. See the changelog for a summary of the included changes: https://github.com/mvdan/sh/blob/v3.0.0-beta1/CHANGELOG.md#unreleased
-
v3.0.0-alpha3
September 23, 2019