sh v3.5.1 Release Notes

Release Date: 2022-05-23 // 7 months ago
    • cmd/shfmt
      • Fix the Docker publishing script bug which broke 3.5.0 - [#860]
    • interp
      • Support multi-line strings when pattern matching in [[ - [#861]
      • Invalid glob words are no longer removed with nullglob - [#862]
    • pattern
      • Regexp now returns the typed error SyntaxError - [#862]

Previous changes from v3.5.0

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