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
7.1k stars 336 forks source link

WIP: add $HOSTTYPE and $OSTYPE #912

Closed zimbatm closed 3 months ago

zimbatm commented 1 year ago

Bash has those implicit variables set. Do you think it's worth having them in here as well? I don't have the full mapping but happy to keep digging.

mvdan commented 1 year ago

This seems perfectly fine to me :) The interpreter generally supports Bash features in a best-effort way, simply because it would be a full-time job for many months to fully implement man bash. So I certainly welcome PRs with tests :)

lawrence-c commented 1 year ago

Hey! I was wondering if there was an update to this PR? Just hit a similar issue when using Taskfile, it seems to link back to here.

Followed from: https://github.com/go-task/task/issues/396 cc @andreynering

zimbatm commented 1 year ago

Feel free to take over; my plate is currently quite full.