mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
Add style note for 'mycmd; if [ $? -eq 0 ]'.
This commit is contained in:
parent
dbafbb3b3b
commit
47a7065a7a
2 changed files with 33 additions and 0 deletions
|
@ -195,6 +195,8 @@ isLiteral t = isJust $ getLiteralString t
|
|||
-- Turn a NormalWord like foo="bar $baz" into a series of constituent elements like [foo=,bar ,$baz]
|
||||
getWordParts (T_NormalWord _ l) = concatMap getWordParts l
|
||||
getWordParts (T_DoubleQuoted _ l) = l
|
||||
-- TA_Expansion is basically T_NormalWord for arithmetic expressions
|
||||
getWordParts (TA_Expansion _ l) = concatMap getWordParts l
|
||||
getWordParts other = [other]
|
||||
|
||||
-- Return a list of NormalWords that would result from brace expansion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue