-
Thanks a lot for this wonderfully crafted crate, it's a pleasure to use. I noticed that while For a bit more context: In my application, I have two options. One allows the user to specify a font directory via path, the other one just tells the application to search for fonts in system directories. I want both options to be have an environment variable fallback, and this seems to work correctly (i.e. the Here's are the two bpaf parsers: let fonts_dir = long("fonts")
.env("OIKOS_FONTS")
.help("Load fonts from this directory")
.argument::<PathBuf>("DIR")
.optional();
let system_fonts = long("system-fonts")
.env("OIKOS_SYSTEM_FONTS")
.help("Search for additional fonts in system directories")
.switch(); And here's the currently generated help output:
Where I would love to be able to see something like this:
Would something like this be possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's a bug, fixed in #200 I changed the representation from your desired output a bit though - it doesn't really matter what the value of the env variable is for flag purposes. bpaf checks if it's set or unset so it would look like this:
Thank you for the report, I'll publish this change along with a few other open tickets I have a bit later. |
Beta Was this translation helpful? Give feedback.
It's a bug, fixed in #200
I changed the representation from your desired output a bit though - it doesn't really matter what the value of the env variable is for flag purposes. bpaf checks if it's set or unset so it would look like this:
Thank you for the report, I'll publish this change along with a few other open tickets I have a bit later.