Michael Greenberg
Michael Greenberg
Nice! That means porting to my stuff should be easy, when it's ready. My cleanup work is back on the original repo, at [mgree/libdash on branch python-bindings](https://github.com/mgree/libdash/tree/python-bindings). I don't have...
I would bet that I need a subset of what's in there, with probably only minor tweaks. If you want to just ignore my stuff for now, and I'll steal...
Yes, completely sound to omit them for a single command. There are times you really, really want to do it anyway, though: notably, at function definitions. (POSIX says `f() echo...
I feel like the real thing we want here is a properly tested, properly written pretty printer. The tests on the OCaml AST from libdash are obviously insufficient, and the...
I can confirm that [the POSIX spec allows this behavior](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_05), and `dash` accepts it: ```ShellSession $ fd=2 $ echo hi >&$fd hi $ fd=3 $ echo hi >&$fd /Users/mgree/smoosh/libdash/src/dash: 4:...
I see two options that keep compliance: (1) use environment variables, e.g., `PASH_ANNOTATIONS` in some format that lets you extend it, like the path (2) overload the noop command `:`...
Yes, agreed! I think the `:` form is the absolute simplest, though it would add a form of invisible dynamic scoping (i.e., the last `: pash-config FOO` command wins). The...
Might be good to give an indication of the kinds of things that _don't_ work, e.g., variables in redirects, arrays, process substitutions, some fancy bash parameter forms.
That's perfectly valid POSIX, but you won't be happy with what it means: dash, say, is going to parse the lvalue of the assignment as a command.
There are two ways forward if you want to handle these extensions, afaict: - libbash (or [idank/bashlex](https://github.com/idank/bashlex), or shellcheck, or whatever) - direct interposition