All Versions
Latest Version
Avg Release Cycle
60 days
Latest Release
15 days ago

Changelog History
Page 1

  • v3.5.0 Changes

    May 11, 2022

    ๐Ÿš€ This release drops support for Go 1.16 and includes many new features.

    • cmd/shfmt
      • Switch to -ln=auto by default to detect the shell language
      • Add support for long flags, like --indent for -i
    • syntax
      • Allow extglob wildcards as function names like @() { ... }
      • Add support for heredocs surrounded by backquotes
      • Add support for backquoted inline comments
      • Add NewPos to create Pos values externally
      • Support escaped newlines with CRLF line endings
      • Minify no longer omits a leading shebang comment
      • Avoid printing escaped newlines in non-quoted words
      • Fix some printer edge cases where comments weren't properly spaced
    • fileutil
      • Add Shebang to extract the shell language from a #! line
    • expand
      • Reimplement globstar ** globbing for correctness
      • Replace os.Stat as the last direct use of the filesystem
    • interp
      • Add CallHandler to intercept all interpreted CallExpr nodes
      • Add ReadDirHandler to intercept glob expansion filesystem reads
      • Add StatHandler to intercept os.Stat and os.Lstat calls
      • Always surface exit codes from command substitutions
      • Add initial and incomplete support for set -x
      • Add support for cd - as cd "$OLDPWD"
      • Avoid panic on set - args
  • v3.4.3 Changes

    February 19, 2022
    • cmd/shfmt
      • New Docker v3 tag to track the latest stable version
      • Don't duplicate errors when walking directories
    • interp
      • Properly handle empty paths in the test builtin
      • Allow unsetting global vars from inside a function again
      • Use %w to wrap errors in Dir
  • v3.4.2 Changes

    December 24, 2021
    • โœ… The tests no longer assume what locales are installed
    • interp
      • Keep PATH list separators OS-specific to fix a recent regression
      • Avoid negative elapsed durations in the time builtin
  • v3.4.1 Changes

    November 23, 2021
    • syntax
      • Don't return an empty string on empty input to Quote
    • expand
      • Properly sort in ListEnviron to avoid common prefix issues
    • interp
      • export used in functions now affects the global scope
      • Support looking for scripts in $PATH in source
      • Properly slice arrays in parameter expansions
  • v3.4.0 Changes

    October 01, 2021

    ๐Ÿš€ This release drops support for Go 1.15, which allows the code to start benefitting from io/fs.

    • cmd/shfmt
      • Walks directories ~10% faster thanks to filepath.WalkDir
    • syntax
      • Add Quote to mirror strconv.Quote for shell syntax
      • Skip null characters when parsing, just like Bash
      • Rewrite fuzzers with Go 1.18's native fuzzing
    • fileutil
      • Add CouldBeScript2 using io/fs.DirEntry
    • expand
      • Skip or stop at null characters, just like Bash
    • interp
      • Set GID just like UID
      • Add support for read -p
      • Add support for pwd flags
      • Create random FIFOs for process substitutions more robustly
      • Avoid leaking an open file when interpreting $(<file)
  • v3.3.1 Changes

    August 01, 2021
    • 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
  • v3.3.0 Changes

    May 17, 2021
    • 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
  • v3.2.4 Changes

    March 08, 2021
    • cmd/shfmt
      • Don't stop handling arguments when one results in a failure
    • expand
      • Don't panic when a backslash is followed by EOF
  • v3.2.2 Changes

    January 29, 2021
    • syntax
      • Avoid comment position panic in the printer
  • v3.2.1 Changes

    December 02, 2020


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