Fix CLI options parser in 'has' + updated 'packages_all.sh' #83
Open
eric-glb wants to merge 14 commits into
Open
Fix CLI options parser in 'has' + updated 'packages_all.sh' #83eric-glb wants to merge 14 commits into
eric-glb wants to merge 14 commits into
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
kdabir
requested changes
Jul 28, 2025
Owner
kdabir
left a comment
There was a problem hiding this comment.
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: -- "$@") |
Owner
There was a problem hiding this comment.
While i'm not expert at this but internet seems to prefer getopts over getopt (particularly for macos and linux compatibility of the script).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sorry for the noise (several PR I closed), I muddled a bit between my branches.
Therefore this PR:
getoptinstead of bash built-ingetopts-> it fixes the long options parser--coloroption_usage(): added--colorexplanation, + small typo (-vinstead of-V)packages_all.shregex in order to removeversion,help, etc. from its output