Closed LucasLarson closed 3 years ago
Very well reported.
There are two aspects of this that need fixing:
export
is not on the list of those keywords (together with declare
, local
and readonly
). I fail to remember if this was an oversight. This would allow not quoting the right side.Workaround:
In this case, you may drop the inner curly braces, since they are not significant.
If I save
example.sh
with this content:and run
shellharden --replace -- example.sh
, its content is changed to this:instead of perhaps this:
or keeping the right side without quotation marks:
I was able to reproduce this using shellharden 4.1.2 on Ubuntu 20.10’s GNOME Terminal 3.38 and macOS 11.3’s Terminal 2.11 and iTerm2 3.4