| Age | Commit message (Collapse) | Author | Files | Lines |
|
This makes the usage a bit cleaner as the results of the parsing may be
accessed with e.g. ret.flags.version instead of ret.flags.@"-version".
|
|
This also cleans up the code by using @Type(), eliminating the need
for the argFlag() and boolFlag() functions.
Allowing [:0]const u8 arguments makes this parser useful for
river-control commands as well.
|
|
I don't need anyone's permission to make this change since
GPL-3.0-or-later is one-way compatible with GPL-3.0-only.
|
|
We always pass the result of this to mem.span() currently, no need for
the code duplication.
|
|
Also:
- Check for -help option *before* unknown options
- Use common flags parsing code for riverctl
- Add usage text to riverctl
|
|
This is currently unused and I don't like the approach anymore
regardless. If/when we need positional arguments (probably when
implementing the upcoming river-control protocol in rivertile)
they should be handled separately from flags.
This commit also improves the CLI error reporting to always print the
usage string if invalid arguments were passed.
|
|
This makes river's main() function quite a bit cleaner.
|