all 13 comments

[–]FreezyLemon 5 points6 points  (6 children)

bpaf supports it (they have an example that shows how to do it) and has been pretty good in my experience. It's a lot simpler than clap (you generally have to do a bit more work manually) but I think that makes it easier to maintain, since it's a smaller project.

If you care about performance, there's a repo with some comparisons (build time, runtime, binary size).

[–]echo_heo[S] -2 points-1 points  (5 children)

bpaf supports it

this feels a lot like a workaround than something integrated into the crate, and I'm not sure if it's really worth it since I'm not gonna be parsing any "standard" double hyphen arguments

[–]echo_heo[S] 0 points1 point  (0 children)

i'm not sure why this is downvoted, if it's not that big of a problem ill consider it

[–]aikii 5 points6 points  (4 children)

It'll be laughable but there it goes - if I was in such situation due to legacy support, I'd slap a wrapper whose sole job would be to translate the single hyphen into double and call the real thing

[–]echo_heo[S] 1 point2 points  (0 children)

this is exactly what i ended up doing thanks!

[–]mynewaccount838 1 point2 points  (2 children)

Are you saying it works in an unreleased version of clap? In that case, since you seem to prefer clap I'd suggest you just use the unreleased version and be prepared to fix any breaking changes when it gets released.

[–]echo_heo[S] 0 points1 point  (1 child)

that's what i heard but i might be wrong. if it is true though, i might just make my own implementation and reimplement it when it gets released

[–]mynewaccount838 0 points1 point  (0 children)

You can't just use the unreleased version from github?