Treat 'exec $1' like '$1' for the purpose of quoting (fixes #2068)

This commit is contained in:
Vidar Holen 2020-12-17 20:30:39 -08:00
parent cc3884cf9f
commit bd3299edd3
3 changed files with 5 additions and 2 deletions

View file

@ -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.