kvz / bash3boilerplate

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

Repeat arguments #106

Closed gdevenyi closed 6 years ago

gdevenyi commented 6 years ago

Right now, if I want to provide multiple inputs to an argument I have to do this:

-s "arg1 arg2"

It would be nice if it instead could be:

-s arg1 -s arg2

Or possibly,

-s arg1 arg1
mstreuhofer commented 6 years ago

the code for argument parsing is already hard enough as it is. i wouldn't want to make it even harder to ever read and understand again. really what you are asking for is to use a proper language with proper argument parsing libs. sorry, but i don't see this as an issue, more as a feature request which, considering what it means, should be closed as wont-fix.

kvz commented 6 years ago

I agree with @mstreuhofer that when you consider the implementation complexity and the cost of that chunk of code in every tempalte, we're beyond the tipping point where it might be more suitable to use an external library (not sure if getops would do the trick already) or a higher level language instead.