-
-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use real options parser #136
Comments
That would be pretty neat. So getopts is built-in to bash? There's no need for an extra dependency or something like that? |
Yeah, getopts is built-in, but only single letter, so it would break your existing long options. The getoptions path would mean pulling in more external stuff, but you give you more expected, standard behavior. It took me several iterations to figure out that the pod name has to come first or it just plain doesn't work. |
Hand coded options parses are always a bad idea.
At least use getopts BASH built-in: https://wiki.bash-hackers.org/howto/getopts_tutorial
Or even better, getoptions: https://dev.to/ko1nksm/the-easiest-way-to-parse-arguments-using-getoptions-for-bash-and-shell-scripts-47p5
The text was updated successfully, but these errors were encountered: