colis-anr / morbig

A static parser for POSIX Shell
Other
190 stars 8 forks source link

wrong alias substitution in case of word ending with space #52

Closed treinen closed 5 years ago

treinen commented 5 years ago

there is a corner case of that weird rule of alias handling when the substitution word ends on a space:

alias x="echo "
x
x x
x x x

in the third line, morbig does not expand the third ocurrence of x. This does not happen when the replacement word is single-quoted. Also, it happens only with at least three occurrences of the aliased word in a row.