-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
pow[000] --> x=1
bash: line 37: 1=x: command not found
How unfortunate! It spits a bunch of errors for a variety of commands. I am not sure it's possible to get it working on both Bash 4 and 5. I think our best bet is to keep writing powscript in 4.x until it's powerful enough for us to rewrite the project in powscript itself. We should have the compiler be able to emit valid bash 4.x and 5.0 by then. Then, we can compile the compiler into whatever version we want. (i.e., the codebase will be in powscript but it will still produce a powscript.bash
, and possibly a powscript.bash4
)
I've been wanting to do this since I was half-way through my first rewrite, (its "Second Form" is necessary for it to exist; well, it didn't need to be in bash, but it's fun that it is) so this is a bit of me taking the opportunity, but I do think this is a good solution to the problem, even if it ends up being more work in the short term, it will make for a cleaner codebase, and when Bash 6.0 comes around, we'll just have to have powscript support it to have 4,5, and 6 working for us, instead of then having to possibly break compatibility with 5.
What do you think? I am ready to take on this plan (though there's still a bunch of things left to implement before we start, like macros, better support for associative structures and error handling)