diff options
Diffstat (limited to 'src/Parser')
| -rw-r--r-- | src/Parser/Shell.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Parser/Shell.hs b/src/Parser/Shell.hs index b575842..105edfa 100644 --- a/src/Parser/Shell.hs +++ b/src/Parser/Shell.hs @@ -29,7 +29,7 @@ parseTextArgument = lexeme $ fmap (App AnnNone (Pure T.concat) <$> foldr (liftA2 , unquotedString ] where - specialChars = [ '"', '\'', '\\', '$', '#', '|', '>', '<', ';', '[', ']', '{', '}', '(', ')', '*', '?', '~', '&', '!' ] + specialChars = [ '"', '\'', '\\', '$', '#', '|', '>', '<', ';', '[', ']'{-, '{', '}' -}, '(', ')'{-, '*', '?', '~', '&', '!' -} ] stringSpecialChars = [ '"', '\\', '$' ] @@ -66,10 +66,7 @@ parseTextArgument = lexeme $ fmap (App AnnNone (Pure T.concat) <$> foldr (liftA2 standaloneEscapedChar :: TestParser (Expr Text) standaloneEscapedChar = do void $ char '\\' - fmap Pure $ choice $ - map (\c -> char c >> return (T.singleton c)) specialChars ++ - [ char ' ' >> return " " - ] + fmap T.singleton . Pure <$> printChar parseRedirection :: TestParser (Expr ShellArgument) parseRedirection = choice |