mvdan / sh

A shell parser, formatter, and interpreter with bash support; includes shfmt
https://pkg.go.dev/mvdan.cc/sh/v3
BSD 3-Clause "New" or "Revised" License
6.97k stars 332 forks source link

Request: Support for new POSIX 2022 sh features #1050

Closed mcandre closed 5 months ago

mcandre commented 5 months ago

The upcoming POSIX 2022 (lol) standard will include new features for many programs, such as set -o pipefail for sh.

Will the mvdan/sh AST need to be extended to add support for new flags?

mvdan commented 5 months ago

set is just a builtin, so it's not represented in any special way in the syntax tree.

As far as I can see, this new POSIX standard version isn't finished yet. Until it is, I don't think we want to prematurely make any changes. I can't even find a link to the latest version of its shell language specification after ten minutes of looking around.