Stop treating backticks as literals.

This commit is contained in:
Vidar Holen 2012-11-27 23:11:59 -08:00
parent 0cbbee7b89
commit 396541f3c2
3 changed files with 6 additions and 3 deletions

View file

@ -82,6 +82,7 @@ willSplit x =
case x of
T_DollarBraced _ _ -> True
T_DollarExpansion _ _ -> True
T_Backticked _ _ -> True
T_BraceExpansion _ s -> True
T_Extglob _ _ _ -> True
T_NormalWord _ l -> any willSplit l
@ -106,6 +107,7 @@ deadSimple (T_SingleQuoted _ s) = [s]
deadSimple (T_DollarBraced _ _) = ["${VAR}"]
deadSimple (T_DollarArithmetic _ _) = ["${VAR}"]
deadSimple (T_DollarExpansion _ _) = ["${VAR}"]
deadSimple (T_Backticked _ _) = ["${VAR}"]
deadSimple (T_Pipeline _ [x]) = deadSimple x
deadSimple (T_Literal _ x) = [x]
deadSimple (T_SimpleCommand _ vars words) = concatMap (deadSimple) words