Replies: 1 comment 2 replies
-
There are two ways you can go about it - preprocessing arguments as you get them from the OS before feeding to
There's no way to change Once basic things are in place - compositions should just work. So most of this is doable with varying amount of effort. |
Beta Was this translation helpful? Give feedback.
-
I'd like to experiment with a more ergonomic though unconventional syntax, as far as I understood from the docs it might be possible as bpaf is flexible enough (e.g., you can use
+
per this example https://docs.rs/bpaf/0.9.3/bpaf/_documentation/_2_howto/_02_xorg/index.html), but then also has some limits re. colors, so thought I'd ask here first which of the following is feasible within bpaf (and any pointers on how to do that in a simpler way would be appreciated)Roughly the scheme would be as follows:
,
as a prefix vs. the pinky-murdering - and ---
for compatibility,
prefix the short option concatenation should be disabled (this would allow not requiring,,
for long options), but then you could concatenate without spaces like,s,d,g,long
-
prefix should retain whatever the current defaults are, so it would still be-sdg --long
or-s -d -g --long
Then also a bunch of custom formatting options:
so instead of
it should be
,
and-
should be colored differently from the text (I tried.help("text".blue().bold())
from thecolored
crate to test for a specific argument's help message, but then got a trait boundbpaf::Doc: From<ColoredString>
error)bright-color
?)-h
you could make it NOT have any colors or if you want to emphasize[-s]
, allow using maybe underlines or at least a different color emphasis (I'd prefer to include an extra short legend),
notation,-
should only be mentioned in the description mentioned aboveBeta Was this translation helpful? Give feedback.
All reactions