forked from mvdan/sh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syntax: fix whitespace on nested subshells
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
- Loading branch information
1 parent
4c7f3cb
commit 712b809
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# OK - no blank | ||
( (echo "Hello world!") ) | ||
|
||
# nok - blank ^ after first ( | ||
( | ||
(echo "Hello world!") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters