Simplify getSpecial
This commit is contained in:
parent
1cf0aa25e9
commit
ca41440a67
|
@ -826,9 +826,8 @@ getBracedReference s = fromMaybe s $
|
|||
let name = takeWhile isVariableChar s
|
||||
guard . not $ null name
|
||||
return name
|
||||
getSpecial (c:_) =
|
||||
if c `elem` "*@#?-$!" then return [c] else fail "not special"
|
||||
getSpecial _ = fail "empty"
|
||||
getSpecial (c:_) | c `elem` "*@#?-$!" = return [c]
|
||||
getSpecial _ = fail "empty or not special"
|
||||
|
||||
nameExpansion ('!':rest) = do -- e.g. ${!foo*bar*}
|
||||
let suffix = dropWhile isVariableChar rest
|
||||
|
|
Loading…
Reference in New Issue