-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues when using empty aliases with certain builtins #299
Comments
The inconsistency between export and declare/local will be fixed with #236 (dynamic assignments). The other bugs are I guess because OSH has a different parsing/evaluation model of aliases. They seem somewhat similar to cases 33-34 here: http://www.oilshell.org/release/0.6.pre18/test/spec.wwz/alias.html where I have alias LEFT='{' and alias LEFT='(', which works in most shells but not OSH. That is basically because of the design philosophy here: http://www.oilshell.org/blog/2019/02/07.html Are you using this for something? If not, I'm inclined to leave this as is, unless there it moves something here forward: https://github.com/oilshell/oil/wiki/Shell-Programs-That-Run-Under-OSH All the shell parsers I looked at are littered with special cases regarding aliases. In contrast, OSH uses the parser "from the outside", which is more understandable. It has a pretty clear evaluation model, whereas in most shells you have to enumerate all the special cases to know what it does. Another case where this is true is a slight incompatibility with backticks, which somebody on help-bash@ is trying (and failing) to get an explanation of right now... OSH has a pretty compatible and explainable rule that runs virtualenv, but it disagrees on a corner case where other shells agree. That is case #25 here: http://www.oilshell.org/release/0.6.pre18/test/spec.wwz/command-sub.html However shells stop agreeing on case #26 :) |
I just committed a spec test that records this incompatibility. It's unfortunate that all shells do agree on this and OSH doesn't, but like I said, I'm going to put it low on the pile unless real world use cases show up. I also started documenting some more of the known incompatibilities in doc/osh-manual.md. |
Nope; I found it while playing with https://github.com/rdebath/Brainfuck/blob/master/extras/bf2bash.sh, which is honestly quite horribly written/hacky in my opinion. |
OK since I documented this incompatibility in the spec tests, I'm closing this... it may or may not come up again in the future :-/ |
The text was updated successfully, but these errors were encountered: