Closed ContinuousCaffeniation closed 2 years ago
Thanks, this definitely sounds like a bug. We have logic to print two nested subshells in a single line as ( (
rather than ((
, because the latter is ambiguous syntax. The logic is likely kicking in with multiple lines when it shouldn't be. Should be a relatively easy fix if anyone wants to take a look :)
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.