45

Release v2.2.0 · mvdan/sh · GitHub

 6 years ago
source link: https://github.com/mvdan/sh/releases/tag/v2.2.0
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

v2.2.0

Compare

@mvdanmvdan

released this

18 Jan 12:52
· 965 commits to master since this release

Highlights:

  • Tests on Mac and Windows are now ran as part of CI
  • syntax
    • Add StopAt to stop lexing at a custom arbitrary token
    • Add TranslatePattern and QuotePattern for pattern matching
    • Minification support added to the printer - see Minify
    • Add ParamExp.Names to represent ${!prefix*}
    • Add TimeClause.PosixFormat for its -p flag
    • Fix parsing of assignment values containing =
    • Fix parsing of parameter expansions followed by a backslash
    • Fix quotes in parameter expansion operators like ${v:-'def'}
    • Fix parsing of negated declare attributes like declare +x name
    • Fix parsing of ${#@}
    • Reject bad parameter expansion operators like ${v@WRONG}
    • Reject inline array variables like a=(b c) prog
    • Reject indexing of special vars like ${1[3]}
    • Reject ${!name} when in POSIX mode
    • Reject multiple parameter expansion actions like ${#v:-def}
  • interp
    • Add Bash brace expansion support, including {a,b} and {x..y}
    • Pattern matching actions are more correct and precise
    • Exported some Runner internals, including Vars and Funcs
    • Use the interpreter's $PATH to find binaries
    • Roll our own globbing to use our own pattern matching code
    • Support the getopts sh builtin
    • Support the read bash builtin
    • Numerous changes to improve Windows support
  • shell
    • New experimental package with high-level utility functions
    • Add SourceFile to get the variables declared in a script
    • Add SourceNode as a lower-level version of the above
  • cmd/shfmt
    • Add -mn, which minifies programs via syntax.Minify

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK