-
-
Notifications
You must be signed in to change notification settings - Fork 348
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: trailing white space added after opening parenthesis '(' #814
Labels
Comments
Thanks, this definitely sounds like a bug. We have logic to print two nested subshells in a single line as |
mvdan
changed the title
shfmt: trailing white space added after opening parenthesis '('
syntax: trailing white space added after opening parenthesis '('
Mar 21, 2022
riacataquian
added a commit
to riacataquian/sh
that referenced
this issue
May 31, 2022
we want white space on nested subshells if its in a single line since its ambiguous, eg we want `( (` over `((` this shouldn't be the case for multiple lines- fix the logic that adds white space to only do so if the two subshells are in the same line fixes mvdan#814
riacataquian
added a commit
to riacataquian/sh
that referenced
this issue
May 31, 2022
we want white space on nested subshells if its in a single line since its ambiguous, eg we want `( (` over `((` this shouldn't be the case for multiple lines- fix the logic that adds white space to only do so if the two subshells are in the same line fixes mvdan#814
riacataquian
added a commit
that referenced
this issue
Jun 6, 2022
we want white space on nested subshells if its in a single line since its ambiguous, eg we want `( (` over `((` this shouldn't be the case for multiple lines- fix the logic that adds white space to only do so if the two subshells are in the same line fixes #814
riacataquian
added a commit
to riacataquian/sh
that referenced
this issue
Jun 6, 2022
we want white space on nested subshells if its in a single line since its ambiguous, eg we want `( (` over `((` this shouldn't be the case for multiple lines- fix the logic that adds white space to only do so if the two subshells are in the same line fixes mvdan#814
riacataquian
added a commit
that referenced
this issue
Jun 6, 2022
we want white space on nested subshells if its in a single line since its ambiguous, eg we want `( (` over `((` this shouldn't be the case for multiple lines- fix the logic that adds white space to only do so if the two subshells are in the same line fixes #814
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the second example below, a trailing blank/ white space is inserted after first opening '(' symbol, this is indicated through '^'. The expectation is like in first example above. This seems to happen when opening a subshell first after opening brackets of another subshell.
shfmt is called without any parameters in this case.
The text was updated successfully, but these errors were encountered: