'main': Apply the parameter expansion logic regardless of the type

The existing check was bogus: parameter expansion doesn't depend on
whether there happens to be a command literally called «$foo».

This enables the parameter elision logic to kick in for words not in
command position.

Fixes #239.
This commit is contained in:
Daniel Shahaf 2020-03-19 22:06:21 +00:00
commit b47387b55e
5 changed files with 47 additions and 7 deletions

View file

@ -39,7 +39,7 @@ expected_region_highlight=(
'11 11 commandseparator' # ;
'13 14 reserved-word' # do
'16 19 builtin' # echo
'21 22 default' # $n
'21 22 comment' # $n - because it's unset when the line is parsed
'23 23 commandseparator' # ;
'25 27 unknown-token' # end
)