Skip to content

Conversation

eric-glb
Copy link

Sorry for the noise (several PR I closed), I muddled a bit between my branches.

Therefore this PR:

  1. getopt instead of bash built-in getopts -> it fixes the long options parser
  2. fixed --color option
  3. updated _usage(): added --color explanation, + small typo (-v instead of -V)
  4. updated tests due to 2.
  5. updated packages_all.sh regex in order to remove version, help, etc. from its output

Copy link
Owner

@kdabir kdabir left a 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.

has
OUTPUT=/dev/null
;;
h)
OPTS=$(getopt -o qvh --long quiet,version,help,color: -- "$@")
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants