Releases: mvdan/sh
Releases · mvdan/sh
v1.2.0
Highlights:
- syntax
- Add support for escaped characters in bash regular expressions
- fileutil
- New package with some code moved from
cmd/shfmt
, now importable - New funcs
HasShebang
andCouldBeScript
- Require shebangs to end with whitespace to reject
#!/bin/shfoo
- New package with some code moved from
Binaries built on go version go1.8 linux/amd64
.
v1.1.0
Highlights:
- syntax
- Parse
[[ a = b ]]
like[[ a == b ]]
, deprecatingTsAssgn
in favour ofTsEqual
- Add support for the
-k
,-G
,-O
and-N
unary operators inside[[ ]]
- Add proper support for
!
in parameter expansions, like${!foo}
- Fix a couple of crashes found via fuzzing
- Parse
- cmd/shfmt
- Rewrite
[[ a = b ]]
into the saner[[ a == b ]]
(see above)
- Rewrite
Binaries built on go version devel +a2b615d527 Thu Jan 5 15:37:37 2017 +0000 linux/amd64
.
v1.0.0
v0.6.0
Highlights:
- syntax
Parse
now takes anio.Reader
instead of[]byte
- Invalid UTF-8 is now reported as an error
- Remove backtracking for
$((
and((
Walk
now takes a func literal to simplify its use
Binaries built on go version devel +ed0b232 Mon Dec 5 03:53:56 2016 +0000 linux/amd64
.
v0.5.0
Highlights:
- cmd/shfmt
- Remove
-cpuprofile
- Don't read entire files into memory to check for a shebang
- Remove
- syntax
- Use
uint32
for tokens and positions in nodes - Use
Word
andLit
pointers consistently instead of values - Ensure
Word.Parts
is never empty - Add support for expressions in array indexing and parameter expansion slicing
- Use
Binaries built on go version devel +a2bd5c5 Thu Nov 24 03:48:45 2016 +0000 linux/amd64
.
v0.4.0
Highlights:
- Merge
parser
,ast
,token
andprinter
into a single packagesyntax
- Use separate operator types in nodes rather than
Token
- Use operator value names that express their function
- Keep
;
if on a separate line when formatting - cmd/shfmt
- Allow whitespace after
#!
in a shebang
- Allow whitespace after
- syntax
- Implement operator precedence for
[[ ]]
- Parse
$(foo)
andfoo
as the same (shfmt
then converts the latter to the former) - Rename
Quoted
toDblQuoted
for clarity - Split
((foo))
nodes as their own type,ArithmCmd
- Add support for bash parameter expansion slicing
- Implement operator precedence for
Binaries built on go version devel +8a2a999 Tue Nov 8 00:51:14 2016 +0000 linux/amd64
.
v0.3.0
Highlights:
- Add support for bash's
coproc
and extended globbing like@(foo)
- Improve test coverage, adding tests to
cmd/shfmt
and bringingparser
andprinter
close to 100% - Support empty C-style for loops like
for ((;;)) ...
- Support for the
>|
redirect operand - cmd/shfmt
- Fix issue where
.sh
and.bash
files might not be walked if running on a directory - Fix issue where
-p
was not obeyed when formatting stdin
- Fix issue where
- parser
$''
now generates anast.SglQuoted
, not anast.Quoted
- Support for ambiguous
((
like with$((
- Improve special parameter expansions like
$@
or$!
- Improve bash's
export
typeset
,nameref
andreadonly
<>
,>&
and<&
are valid POSIX- Support for bash's
^
,^^
,,
and,,
operands inside${}
Binaries built on go version devel +517a44d Tue Oct 25 12:23:49 2016 +0000 linux/amd64
.
Also, binaries are now smaller thanks to -ldflags='-s -w'
.
v0.2.0
Highlights:
- Optimizations all around, making
shfmt
~15% faster - cmd/shfmt
- Add
-p
flag to only accept POSIX Shell programs (parser.PosixConformant
)
- Add
- parser
- Add support for ambiguous
$((
as in$((foo) | bar)
- Limit more bash features to
PosixConformant
being false - Don't parse heredoc bodies in nested expansions and contexts
- Run tests through
bash
to confirm the presence of a parse error
- Add support for ambiguous
- ast
- Add
Walk(Visitor, Node)
function
- Add
Binaries built on go version devel +dc46b88 Thu Oct 13 09:37:17 2016 +0000 linux/amd64
.