github mvdan/sh v3.5.0

latest releases: v3.8.0, v3.7.0, v3.6.0...
2 years ago

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

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

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

Don't miss a new sh release

NewReleases is sending notifications on new releases.