-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
syntax: [ / test do not support expressions specified with escaped parentheses #1036
Comments
Thanks for spotting this and filing an issue. We have supported parentheses in the |
mvdan
added a commit
that referenced
this issue
Oct 14, 2023
Spotted this parser issue when investigating #1036. Note that parsing of [[ happens in the syntax parser, but the classic [ test is done in the interpreter. Both treat both binary operators as having the same precedence.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version 3.7.0
Running the following excerpt, taken from the start of a script that NVIDIA inserts into their container images, through
gosh
results in the error13:4: not a valid test operator: (
It appears from a simpler example, that
mvdan.cc/sh
/gosh
doesn't support parentheses intest
/[
expressions, as below... where they are written\(
to avoid subshell evaluation.Is support for parentheses in test / [ expressions something that would be in scope for this package, or does it fall under the other caveats around ambiguity etc?
The text was updated successfully, but these errors were encountered: