-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add a kernel-style command-line parser #62
Conversation
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.
This PR would be nice to have for UEFI, where we might want to parse cmdline arguments in eir. Same applies for the Raspberry Pi 4 support, where this is done manually for now.
A couple of notes:
- Adding a
store_false
(analogous to argparse) would be nice - supporting quoted arguments would be nice, but supporting escaped quotes in the middle of a quoted argument would require allocations (and can be skipped for now IMO)
- the header is not listed for installation in the
meson.build
This allows for the following usage of frg::array: frg::array foo = {1, 2, 3};
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.
This seems as feature-complete as I would like a basic implementation to be. Implementing features that require allocation is either out of scope or should be done later, althrough I think the former is betterer™.
LGTM.
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.
LGTM
This parser accepts a command-line in a format similar to Linux's: "foo bar=baz qux=12".
No description provided.