mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-09-30 08:49:20 +08:00
Suggest quoting expansions in for loop globs
This commit is contained in:
@@ -435,3 +435,12 @@ pseudoGlobIsSuperSetof = matchable
|
||||
|
||||
wordsCanBeEqual x y = fromMaybe True $
|
||||
liftM2 pseudoGlobsCanOverlap (wordToPseudoGlob x) (wordToPseudoGlob y)
|
||||
|
||||
-- Is this an expansion that can be quoted,
|
||||
-- e.g. $(foo) `foo` $foo (but not {foo,})?
|
||||
isQuoteableExpansion t = case t of
|
||||
T_DollarExpansion {} -> True
|
||||
T_DollarBraceCommandExpansion {} -> True
|
||||
T_Backticked {} -> True
|
||||
T_DollarBraced {} -> True
|
||||
_ -> False
|
||||
|
Reference in New Issue
Block a user