Skip to content

@mvdan mvdan released this Aug 1, 2021

Highlights:

  • 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
  • interp
    • Support calling Runner.Reset before Runner.Run
    • Obey set -e for failed redirections

Binaries built on go version go1.16.6 linux/amd64 via a shell script.

Consider becoming a sponsor if you benefit from the work that went into this release!

Assets 10
May 18, 2021
interp: allow running Reset before Run
It can make sense, for example to make copies of a new runner to be used
later.

While at it, I noticed that Subshell failed to initialize the Vars map,
meaning that it wasn't filled at the end of Run.

Fixes #704.

@mvdan mvdan released this May 17, 2021

Highlights:

  • cmd/shfmt
    • Document the FORCE_COLOR env var to always use colors in diffs
  • 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
  • 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 of LookPathDir
    • 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

Binaries built on go version go1.16.4 linux/amd64 via a shell script.

Consider becoming a sponsor if you benefit from the work that went into this release!

Assets 10

@mvdan mvdan released this Mar 8, 2021

Highlights:

  • cmd/shfmt
    • Don't stop handling arguments when one results in a failure
  • expand
    • Don't panic when a backslash is followed by EOF

Binaries built on go version go1.16 linux/amd64 via a shell script.

Consider becoming a sponsor if you benefit from the work that went into this release!

Assets 10
Mar 8, 2021
add release notes for v3.2.3

@mvdan mvdan released this Jan 29, 2021

Highlights:

  • syntax
    • Avoid comment position panic in the printer

Binaries built on go version go1.15.7 linux/amd64 via a shell script.

Consider becoming a sponsor if you benefit from the work that went into this release!

Assets 9

@mvdan mvdan released this Dec 2, 2020

Highlights:

  • 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
  • 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!

Assets 9
Nov 2, 2020
syntax: fix hang parsing single quotes in parameter expansions
This regression was introduced in 5bb742d, since we didn't include
enough test cases. In particular, one where the single quote directly
followed the forward slash token.

Fixes #626.

@mvdan mvdan released this Oct 30, 2020

Highlights:

  • 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!

Assets 9

@mvdan mvdan released this Jun 26, 2020

Highlights:

  • syntax
    • Fix brace indentation when using FunctionNextLine
    • Support indirect parameter expansions with transformations
    • Stop heredoc bodies only when the entire line matches
  • interp
    • Make the tests pass on 32-bit platforms

Binaries built on go version go1.14.4 linux/amd64.

Assets 22