argi
argi copied to clipboard
Hyphenated arguments like `--long-opt` don't parse in macros
If I try to use an argument with a hypen in it, I get a compile error like:
error[E0609]: no field `args` on type `&argi::Argument<'_>`
--> bin/main.rs:44:11
|
44 | match data!(bool, ctx => --include-methods) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown field
Is this supported? Could it be? Perhaps by specifying the arg in quotes/string...
It's a known issue in the beta unfortunately, for now the workaround is to do the quite ugly --include_methods. I'm getting back after a break so this is next on the list!
Current testing shows that this also occurs within the cli! macro. For example, --example-arg goes to --example --arg and -fwefwef will go to --fwefwef.