mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-13 08:33:20 -07:00
Treat 'exec $1' like '$1' for the purpose of quoting (fixes #2068)
This commit is contained in:
parent
cc3884cf9f
commit
bd3299edd3
3 changed files with 5 additions and 2 deletions
|
@ -370,8 +370,8 @@ usedAsCommandName tree token = go (getId token) (tail $ getPath tree token)
|
|||
| currentId == getId word = go id rest
|
||||
go currentId (T_DoubleQuoted id [word]:rest)
|
||||
| currentId == getId word = go id rest
|
||||
go currentId (T_SimpleCommand _ _ (word:_):_)
|
||||
| currentId == getId word = True
|
||||
go currentId (t@(T_SimpleCommand _ _ (word:_)):_) =
|
||||
getId word == currentId || getId (getCommandTokenOrThis t) == currentId
|
||||
go _ _ = False
|
||||
|
||||
-- A list of the element and all its parents up to the root node.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue