From 710a28c5724ebfef349d2c89911e448b358c7f12 Mon Sep 17 00:00:00 2001 From: Vidar Holen <spam@vidarholen.net> Date: Sun, 29 Sep 2013 21:35:20 -0700 Subject: [PATCH] Revert "Fixed parsing for 'eval var=(values)'", because it fails for 'eval $x=foo' This reverts commit 34e69556b1c9c6f79488059f7c020f449e4cdb1f. --- ShellCheck/Parser.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index b71ee4e..03ebb29 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -1153,7 +1153,6 @@ prop_readSimpleCommand = isOk readSimpleCommand "echo test > file" prop_readSimpleCommand2 = isOk readSimpleCommand "cmd &> file" prop_readSimpleCommand3 = isOk readSimpleCommand "export foo=(bar baz)" prop_readSimpleCommand4 = isOk readSimpleCommand "typeset -a foo=(lol)" -prop_readSimpleCommand5 = isOk readSimpleCommand "eval foo=(bar baz)" readSimpleCommand = called "simple command" $ do id1 <- getNextId id2 <- getNextId @@ -1170,7 +1169,7 @@ readSimpleCommand = called "simple command" $ do return $ makeSimpleCommand id1 id2 prefix [cmd] suffix where isModifierCommand (T_NormalWord _ [T_Literal _ s]) = - s `elem` ["declare", "export", "local", "readonly", "typeset", "eval"] + s `elem` ["declare", "export", "local", "readonly", "typeset"] isModifierCommand _ = False prop_readPipeline = isOk readPipeline "! cat /etc/issue | grep -i ubuntu"