Skip to content

cli.argparser: fix config file args parser #5484

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

Conversation

bastimeyer
Copy link
Member

  • Fix options regex
    • parse all alphanumerical options with dashes
    • be more strict around the option-value operator and properly ignore invalid option formats, just like comments
  • Fix parsing of shorthand options
  • Add tests

Fixes #5481

Option names containing numbers now get properly parsed.

This also fixes the parsing of shorthand options in config files, so something like this works now

l debug

This also fixes options with empty values

title=

And invalid option formats now get properly ignored, just like comments, so

non_matching_option

won't result in --non=_matching_option being returned anymore

@bastimeyer bastimeyer force-pushed the cli/argparser/fix-config-file-args-parser branch 3 times, most recently from 40138ca to ad70d6c Compare August 5, 2023 13:48
- Fix options regex
  - parse all alphanumerical options with dashes
  - be more strict around the option-value operator
    and properly ignore invalid option formats, just like comments
- Fix parsing of shorthand options
- Add tests
@bastimeyer bastimeyer force-pushed the cli/argparser/fix-config-file-args-parser branch from ad70d6c to a2f7172 Compare August 5, 2023 15:38
@bastimeyer bastimeyer merged commit 180136d into streamlink:master Aug 5, 2023
@bastimeyer bastimeyer deleted the cli/argparser/fix-config-file-args-parser branch August 5, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ipv4 setting in config file doesn't work
1 participant