github.com/mvdan/sh
v2.6.4+incompatible
#383 most downloaded on Go modules
mvdan/sh
What this package is like to depend on
Last release 7 years ago
no release in 18 months
Ships fairly regularly
a new release about every 4 weeks
Some releases are documented
notes for 11 of 24 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
51 releases · first in 2016
0 releases in the last 12 months
see the full history below
Release timeline
51 releases · Jun 2016 to Mar 2019Releases
latest 51-
v2.6.4+incompatible10 Mar 2019Nothing published for this version
-
v2.6.3+incompatible19 Jan 2019Nothing published for this version
-
v2.6.2+incompatible08 Dec 2018Nothing published for this version
-
v2.6.1+incompatible17 Nov 2018Nothing published for this version
-
v2.6.0+incompatible10 Nov 2018Nothing published for this version
-
v2.5.1+incompatible03 Aug 2018Nothing published for this version
-
v2.5.1-0.20180907133431-09fe3e0538c0+incompatible07 Sep 2018 pre-releaseNothing published for this version
-
v2.5.0+incompatible13 Jul 2018Nothing published for this version
-
v2.4.0+incompatible16 May 2018Nothing published for this version
-
v2.3.0+incompatible07 Mar 2018Nothing published for this version
-
v2.2.1+incompatible25 Jan 2018Nothing published for this version
-
v2.2.0+incompatible18 Jan 2018Nothing published for this version
-
v2.1.0+incompatible25 Nov 2017Nothing published for this version
-
v2.0.1-0.20170914203508-693fb96706d3+incompatible14 Sep 2017 pre-releaseNothing published for this version
-
v2.0.0+incompatible30 Aug 2017Nothing published for this version
-
v1.3.126 May 2017Release notes
Open source →- syntax
- Fix parsing of
${foo[$bar]} - Fix printer regression where
> >(foo)would be turned into>>(foo) - Break comment alignment on any line without a comment, fixing formatting issues
- Error on keywords like
fianddoneused as commands
- Fix parsing of
- syntax
-
v1.3.1-0.20181216173157-8aeb0734cd0f16 Dec 2018 pre-releaseNothing published for this version
-
v1.3.1-0.20180917103936-65d8e2a4b15617 Sep 2018 pre-releaseNothing published for this version
-
v1.3.1-0.20180829163519-3a244a89e2e529 Aug 2018 pre-releaseNothing published for this version
-
v1.3.1-0.20170805101800-e6f9238b1f6205 Aug 2017 pre-releaseNothing published for this version
-
v1.3.1-0.20170730124705-e5b6ba78896230 Jul 2017 pre-releaseNothing published for this version
-
v1.3.1-0.20170714101613-cbdcf488deae14 Jul 2017 pre-releaseNothing published for this version
-
v1.3.1-0.20170705135418-6773c283e82005 Jul 2017 pre-releaseNothing published for this version
-
v1.3.1-0.20170624185320-7545ea3a7ad324 Jun 2017 pre-releaseNothing published for this version
-
v1.3.1-0.20170614140001-c79708369f1c14 Jun 2017 pre-releaseNothing published for this version
-
v1.3.1-0.20170526143719-27fa62d749f426 May 2017 pre-releaseNothing published for this version
-
v1.3.1-0.20170517164415-380eaf2df04117 May 2017 pre-releaseNothing published for this version
-
v1.3.1-0.20170430141130-faf782d3a49830 Apr 2017 pre-releaseNothing published for this version
-
v1.3.024 Apr 2017Release notes
Open source →- syntax
- Fix backslashes in backquote command substitutions
- Disallow some test expressions like
[[ a == ! b ]] - Disallow some parameter expansions like
${$foo} - Disallow some arithmetic expressions like
((1=3))and(($(echo 1 + 2))) - Binary commands like
&&,||and pipes are now left-associative
- fileutil
CouldBeScriptmay now return true on non-regular files such as symlinks
- interp
- New experimental package to interpret a
syntax.Filein pure Go
- New experimental package to interpret a
- syntax
-
v1.2.1-0.20170424113108-17e267b541e324 Apr 2017 pre-releaseNothing published for this version
-
v1.2.022 Feb 2017Release notes
Open source →- syntax
- Add support for escaped characters in bash regular expressions
- fileutil
- New package with some code moved from
cmd/shfmt, now importable - New funcs
HasShebangandCouldBeScript - Require shebangs to end with whitespace to reject
#!/bin/shfoo
- New package with some code moved from
- syntax
-
v1.1.005 Jan 2017Release notes
Open source →- syntax
- Parse
[[ a = b ]]like[[ a == b ]], deprecatingTsAssgnin favour ofTsEqual - Add support for the
-k,-G,-Oand-Nunary 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
- syntax
-
v1.0.013 Dec 2016Release notes
Open source →- syntax
- Stable release, API now frozen
Parsenow reads input in chunks of 1KiB
- cmd/shfmt
- Add
-versionflag
- Add
- syntax
-
v0.6.005 Dec 2016Release notes
Open source →- syntax
Parsenow takes anio.Readerinstead of[]byte- Invalid UTF-8 is now reported as an error
- Remove backtracking for
$((and(( Walknow takes a func literal to simplify its use
- syntax
-
v0.5.024 Nov 2016Release notes
Open source →- cmd/shfmt
- Remove
-cpuprofile - Don't read entire files into memory to check for a shebang
- Remove
- syntax
- Use
uint32for tokens and positions in nodes - Use
WordandLitpointers consistently instead of values - Ensure
Word.Partsis never empty - Add support for expressions in array indexing and parameter expansion slicing
- Use
- cmd/shfmt
-
v0.4.008 Nov 2016Release notes
Open source →- Merge
parser,ast,tokenandprinterinto 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)andfooas the same (shfmtthen converts the latter to the former) - Rename
QuotedtoDblQuotedfor clarity - Split
((foo))nodes as their own type,ArithmCmd - Add support for bash parameter expansion slicing
- Implement operator precedence for
- Merge
-
v0.3.026 Oct 2016Release notes
Open source →- Add support for bash's
coprocand extended globbing like@(foo) - Improve test coverage, adding tests to
cmd/shfmtand bringingparserandprinterclose to 100% - Support empty C-style for loops like
for ((;;)) ... - Support for the
>|redirect operand - cmd/shfmt
- Fix issue where
.shand.bashfiles might not be walked if running on a directory - Fix issue where
-pwas 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
exporttypeset,namerefandreadonly <>,>&and<&are valid POSIX- Support for bash's
^,^^,,and,,operands inside${}
- Add support for bash's
-
v0.2.013 Oct 2016Release notes
Open source →- Optimizations all around, making
shfmt~15% faster - cmd/shfmt
- Add
-pflag to only accept POSIX Shell programs (parser.PosixConformant)
- Add
- parser
- Add support for ambiguous
$((as in$((foo) | bar) - Limit more bash features to
PosixConformantbeing false - Don't parse heredoc bodies in nested expansions and contexts
- Run tests through
bashto confirm the presence of a parse error
- Add support for ambiguous
- ast
- Add
Walk(Visitor, Node)function
- Add
- Optimizations all around, making
-
v0.1.019 Sep 2016 -
v0.0.0-20180907133431-09fe3e0538c007 Sep 2018 pre-releaseNothing published for this version
-
v0.0.0-20170730124705-e5b6ba78896230 Jul 2017 pre-releaseNothing published for this version
-
v0.0.0-20170714101613-cbdcf488deae14 Jul 2017 pre-releaseNothing published for this version
-
v0.0.0-20170705135418-6773c283e82005 Jul 2017 pre-releaseNothing published for this version
-
v0.0.0-20170614140001-c79708369f1c14 Jun 2017 pre-releaseNothing published for this version
-
v0.0.0-20170424113108-17e267b541e324 Apr 2017 pre-releaseNothing published for this version
-
v0.0.0-20160701153213-10c45c2ce2d801 Jul 2016 pre-releaseNothing published for this version
-
v0.0.0-20160630215830-ed0a7761fd9e30 Jun 2016 pre-releaseNothing published for this version
-
v0.0.0-20160622122235-f177bc9f256822 Jun 2016 pre-releaseNothing published for this version
-
v0.0.0-20160620223658-9899121d4c4e20 Jun 2016 pre-releaseNothing published for this version
-
v0.0.0-20160615232723-fc93dd29d2f715 Jun 2016 pre-releaseNothing published for this version
-
v0.0.0-20160614183351-233b276a55cd14 Jun 2016 pre-releaseNothing published for this version