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

interp: add dotglob support #1022

Open aucampia opened 11 months ago

aucampia commented 11 months ago

Bash supports dotglob, but as far as I can tell mvdan.cc/sh/v3/cmd/gosh does not:

$ go run mvdan.cc/sh/v3/cmd/gosh@latest -c 'shopt -s globstar; shopt -s dotglob; printf "%s\n" ./**/README*'
shopt: invalid option name "dotglob" "off" ("on" not supported)

Just want to know if you are open to including support for it.

mvdan commented 10 months ago

Yes of course - within reason, any useful Bash feature should be added to the interpreter.