Get rid of bracedString everywhere it's easy to

This commit is contained in:
Joseph C. Sible 2020-04-05 17:20:49 -04:00
parent a9d564a8bc
commit 999b7e2596
5 changed files with 27 additions and 27 deletions

View file

@ -718,10 +718,10 @@ checkReadExpansions = CommandCheck (Exactly "read") check
getSingleUnmodifiedBracedString :: Token -> Maybe String
getSingleUnmodifiedBracedString word =
case getWordParts word of
[t@(T_DollarBraced {})] ->
let contents = bracedString t
[T_DollarBraced _ _ l] ->
let contents = concat $ oversimplify l
name = getBracedReference contents
in guard (contents == name) >> return (bracedString t)
in guard (contents == name) >> return contents
_ -> Nothing
prop_checkAliasesUsesArgs1 = verify checkAliasesUsesArgs "alias a='cp $1 /a'"