Add :/. to chars recognized for \alias suppression (fixes #2287)

This commit is contained in:
Vidar Holen 2021-07-21 16:44:21 -07:00
parent 99f6554c9b
commit 9b077e28cb
1 changed files with 2 additions and 1 deletions

View File

@ -2061,6 +2061,7 @@ prop_readSimpleCommand4 = isOk readSimpleCommand "typeset -a foo=(lol)"
prop_readSimpleCommand5 = isOk readSimpleCommand "time if true; then echo foo; fi" prop_readSimpleCommand5 = isOk readSimpleCommand "time if true; then echo foo; fi"
prop_readSimpleCommand6 = isOk readSimpleCommand "time -p ( ls -l; )" prop_readSimpleCommand6 = isOk readSimpleCommand "time -p ( ls -l; )"
prop_readSimpleCommand7 = isOk readSimpleCommand "\\ls" prop_readSimpleCommand7 = isOk readSimpleCommand "\\ls"
prop_readSimpleCommand7b = isOk readSimpleCommand "\\:"
prop_readSimpleCommand8 = isWarning readSimpleCommand "// Lol" prop_readSimpleCommand8 = isWarning readSimpleCommand "// Lol"
prop_readSimpleCommand9 = isWarning readSimpleCommand "/* Lolbert */" prop_readSimpleCommand9 = isWarning readSimpleCommand "/* Lolbert */"
prop_readSimpleCommand10 = isWarning readSimpleCommand "/**** Lolbert */" prop_readSimpleCommand10 = isWarning readSimpleCommand "/**** Lolbert */"
@ -2321,7 +2322,7 @@ readCmdName = do
-- Ignore alias suppression -- Ignore alias suppression
optional . try $ do optional . try $ do
char '\\' char '\\'
lookAhead $ variableChars lookAhead $ variableChars <|> oneOf ":."
readCmdWord readCmdWord
readCmdWord = do readCmdWord = do