mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-12 16:13:19 -07:00
Don't consider ~foo constant.
This commit is contained in:
parent
868d53af95
commit
cd4896192c
2 changed files with 4 additions and 3 deletions
|
@ -55,6 +55,8 @@ isGlob _ = False
|
|||
-- Is this shell word a constant?
|
||||
isConstant token =
|
||||
case token of
|
||||
-- This ignores some cases like ~"foo":
|
||||
T_NormalWord _ (T_Literal _ ('~':_) : _) -> False
|
||||
T_NormalWord _ l -> all isConstant l
|
||||
T_DoubleQuoted _ l -> all isConstant l
|
||||
T_SingleQuoted _ _ -> True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue