Skip to content

Fix long option parsing by using expr instead of arithmetic expansion - #88

Closed
chenrui333 wants to merge 1 commit into
kdabir:masterfrom
chenrui333:fix/long-opts-parsing
Closed

Fix long option parsing by using expr instead of arithmetic expansion#88
chenrui333 wants to merge 1 commit into
kdabir:masterfrom
chenrui333:fix/long-opts-parsing

Conversation

@chenrui333

Copy link
Copy Markdown

@chenrui333 chenrui333 changed the title fix: restore --version and --help on bash 3.2 by pre-parsing long flags Fix long option parsing by using expr instead of arithmetic expansion Jul 29, 2025
@kdabir
kdabir self-requested a review August 1, 2025 09:04

@kdabir kdabir left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. I'll add tests in a separate commit so that this is covered for future.

@kdabir kdabir left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the current changes fail the shellcheck. I am fixing this in master directly and adding some tests. Thank you so much for contributing

@kdabir

kdabir commented Aug 1, 2025

Copy link
Copy Markdown
Owner

Thanks for suggesting the fix. I could not merge your PR because it was failing shellcheck. However that prompted me to add tests for this and also fix it in a way that shellcheck doesn't complain.

@kdabir kdabir closed this Aug 1, 2025
@kdabir

kdabir commented Aug 1, 2025

Copy link
Copy Markdown
Owner

@chenrui333

Copy link
Copy Markdown
Author

yeah, that works for me, thanks!

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.

--version and --help options return error

2 participants