All Versions
41
Latest Version
Avg Release Cycle
55 days
Latest Release
78 days ago

Changelog History
Page 4

  • v1.3.1 Changes

    May 26, 2017

    Highlights:

    • 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 fi and done used as commands
  • v1.3.0 Changes

    April 24, 2017

    Highlights:

    • 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
      • CouldBeScript may now return true on non-regular files such as symlinks
    • interp
      • New experimental package to interpret a syntax.File in pure Go
  • v1.2.0 Changes

    February 22, 2017

    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 and CouldBeScript
      • Require shebangs to end with whitespace to reject #!/bin/shfoo
  • v1.1.0 Changes

    January 05, 2017

    Highlights:

    • syntax
      • Parse [[ a = b ]] like [[ a == b ]], deprecating TsAssgn in favour of TsEqual
      • 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
    • cmd/shfmt
      • Rewrite [[ a = b ]] into the saner [[ a == b ]] (see above)
  • v1.0.0 Changes

    December 13, 2016

    Highlights:

    • syntax
      • Stable release, API now frozen
      • Parse now reads input in chunks of 1KiB
    • cmd/shfmt
      • Add -version flag
  • v0.6.0 Changes

    December 05, 2016

    Highlights:

    • syntax
      • Parse now takes an io.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
  • v0.5.0 Changes

    November 24, 2016

    Highlights:

    • cmd/shfmt
      • Remove -cpuprofile
      • Don't read entire files into memory to check for a shebang
    • syntax
      • Use uint32 for tokens and positions in nodes
      • Use Word and Lit pointers consistently instead of values
      • Ensure Word.Parts is never empty
      • Add support for expressions in array indexing and parameter expansion slicing
  • v0.4.0 Changes

    November 08, 2016

    Highlights:

    • ๐Ÿ“ฆ Merge parser, ast, token and printer into a single package syntax
    • ๐Ÿ‘‰ 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
    • syntax
      • Implement operator precedence for [[ ]]
      • Parse $(foo) and foo as the same (shfmt then converts the latter to the former)
      • Rename Quoted to DblQuoted for clarity
      • Split ((foo)) nodes as their own type, ArithmCmd
      • Add support for bash parameter expansion slicing
  • v0.3.0 Changes

    October 26, 2016

    Highlights:

    • โž• Add support for bash's coproc and extended globbing like @(foo)
    • ๐Ÿ‘Œ Improve test coverage, adding tests to cmd/shfmt and bringing parser and printer 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
    • ๐Ÿ“œ parser
      • $'' now generates an ast.SglQuoted, not an ast.Quoted
      • Support for ambiguous (( like with $((
      • Improve special parameter expansions like [email protected] or $!
      • Improve bash's export typeset, nameref and readonly
      • <>, >& and <& are valid POSIX
      • Support for bash's ^, ^^, , and ,, operands inside ${}
  • v0.2.0 Changes

    October 13, 2016

    Highlights:

    • Optimizations all around, making shfmt ~15% faster
    • cmd/shfmt
      • Add -p flag to only accept POSIX Shell programs (parser.PosixConformant)
    • ๐Ÿ“œ 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
    • ast
      • Add Walk(Visitor, Node) function