Add style note for 'mycmd; if [ $? -eq 0 ]'.

This commit is contained in:
Vidar Holen 2016-08-28 20:54:08 -07:00
parent dbafbb3b3b
commit 47a7065a7a
2 changed files with 33 additions and 0 deletions

View file

@ -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