-
Notifications
You must be signed in to change notification settings - Fork 54
Fix CLI options parser in 'has' + updated 'packages_all.sh' #83
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
base: master
Are you sure you want to change the base?
Conversation
packages_all.sh: better regex
fix small typo in usage()
Fix/getopt instead of getopts
…as into fix/getopt-instead-of-getopts
Fix/getopt instead of getopts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the PR locally it it fails
✗ qvh not understood
✗ --long not understood
✗ quiet,version,help,color: not understood
✗ -- not understood
Ideally I would love to add tests for macos and add a macos runner to github actions.
OUTPUT=/dev/null | ||
;; | ||
h) | ||
OPTS=$(getopt -o qvh --long quiet,version,help,color: -- "$@") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While i'm not expert at this but internet seems to prefer getopts
over getopt
(particularly for macos and linux compatibility of the script).
Sorry for the noise (several PR I closed), I muddled a bit between my branches.
Therefore this PR:
getopt
instead of bash built-ingetopts
-> it fixes the long options parser--color
option_usage()
: added--color
explanation, + small typo (-v
instead of-V
)packages_all.sh
regex in order to removeversion
,help
, etc. from its output