kvz / bash3boilerplate

Templates to write better Bash scripts
http://bash3boilerplate.sh
MIT License
2.13k stars 199 forks source link

removed all usage of eval, proper usage of unset #72

Closed mstreuhofer closed 7 years ago

mstreuhofer commented 7 years ago

replaced all eval with printf -v for security reasons.

the behaviour of unset without -v/-f is actually undefined so make the intent clear.

mstreuhofer commented 7 years ago

interesting. this code works just fine with the default bash (3.2.53) on my OSX as well as the bash (4.4.5) installed with Homebrew. Yet the bash (4.2.25) on Travis seems to differ.

just as well.. let's have this PR here stew for a while. it would conflict with #65 anyway and i'm tired of rebasing and fixing that PR all the time. ;)

mstreuhofer commented 7 years ago

alright. removed some useless escaping of quotes. now it's working as expected.