Skip to content
Mar 11, 2019
Release 3.0.0-alpha1

@mvdan mvdan released this Mar 10, 2019 · 115 commits to master since this release

Highlights:

  • syntax
    • Support array elements without values, like 'declare -A x=([index]=)`
    • Parse for i; do ... uniquely, as it's short for for i in "$@"
    • Add missing error on unclosed nested backquotes
  • expand
    • Don't expand tildes twice, fixing echo ~ on Windows
  • interp
    • Fix the use of Params as an option to New
    • Support lowercase Windows volume names in $PATH

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

Assets 17

@mvdan mvdan released this Jan 19, 2019 · 115 commits to master since this release

Highlights:

  • expand
    • Support globs with path prefixes and suffixes, like ./foo/*/
    • Don't error when skipping non-directories in glob walks

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

Assets 22

@mvdan mvdan released this Dec 8, 2018 · 115 commits to master since this release

Highlights:

  • syntax
    • Avoid premature reads in Parser.Interactive when parsing Unicode bytes
    • Fix parsing of certain Bash test expression involving newlines
    • Redirect.End now takes the Hdoc field into account
    • ValidName now returns false for an empty string
  • expand
    • Environment variables on Windows are case insensitive again
  • interp
    • Don't crash on declare $unset=foo
    • Fix a regression where executed programs would receive a broken environment

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

Assets 22

@mvdan mvdan released this Nov 17, 2018 · 115 commits to master since this release

Highlights:

  • syntax
    • Fix Parser.Incomplete with some incomplete literals
    • Fix parsing of Bash regex tests in some edge cases
  • interp
    • Add support for $(<file) special command substitutions

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

Assets 22
Nov 10, 2018
Release 3.0.0-alpha0

@mvdan mvdan released this Nov 10, 2018 · 116 commits to master since this release

This is the biggest v2 release to date. It's now possible to write an interactive shell, and it's easier and safer to perform shell expansions.

This will be the last major v2 version, to allow converting the project to a Go module in v3.

Highlights:

  • Go 1.10 or later required to build
  • syntax
    • Add Parser.Interactive to implement an interactive shell
    • Add Parser.Document to parse a single here-document body
    • Add Parser.Words to incrementally parse separate words
    • Add the Word.Lit helper method
    • Support custom indentation in <<- heredoc bodies
  • interp
    • Stabilize API and add some examples
    • Introduce a constructor, and redesign Runner.Reset
    • Move the context from a field to function parameters
    • Remove Runner.Stmt in favor of Run with ShellExitStatus
  • shell
    • Stabilize API and add some examples
    • Add Expand, as a more powerful os.Expand
    • Add Fields, similar to the old Runner.Fields
    • Source* functions now take a context
    • Source* functions no longer try to sandbox
  • expand
    • New package, split from interp
    • Allows performing shell expansions in a controlled way
    • Redesigned Environ and Variable moved from interp

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

Assets 22

@mvdan mvdan released this Aug 3, 2018 · 277 commits to master since this release

Highlights:

  • syntax
    • Fix a regression where semicolons would disappear within switch cases

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

Assets 22

@mvdan mvdan released this Jul 13, 2018 · 277 commits to master since this release

Highlights:

  • syntax
    • Add support for Bash's {varname}< redirects
    • Add SpaceRedirects to format redirects like > word
    • Parse $\" correctly within double quotes
    • A few fixes where minification would break programs
    • Printing of heredocs within <() no longer breaks them
    • Printing of single statements no longer adds empty lines
    • Error on invalid parameter names like ${1a}
  • interp
    • Runner.Dir is now always an absolute path
  • shell
    • Expand now supports expanding a lone ~
    • Expand and SourceNode now have default timeouts
  • cmd/shfmt
    • Add -sr to print spaces after redirect operators
    • Don't skip empty string values in -tojson
    • Include comment positions in -tojson

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

Assets 22

@mvdan mvdan released this May 16, 2018 · 311 commits to master since this release

Highlights:

  • Publish as a JS package, mvdan-sh
  • syntax
    • Add DebugPrint to pretty-print a syntax tree
    • Fix comment parsing and printing in some edge cases
    • Indent <<- heredoc bodies if indenting with tabs
    • Add support for nested backquotes
    • Relax parser to allow quotes in arithmetic expressions
    • Don't rewrite declare foo= into declare foo
  • interp
    • Add support for shopt -s globstar
    • Replace Runner.Env with an interface
  • shell
    • Add Expand as a fully featured version of os.Expand
  • cmd/shfmt
    • Set appropriate exit status when -d is used

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

Assets 22
You can’t perform that action at this time.