Tyrrrz / CliFx

Class-first framework for building command-line interfaces
MIT License
1.5k stars 61 forks source link

Show default values in help #54

Closed domn1995 closed 4 years ago

domn1995 commented 4 years ago

Closes #17.

This is kinda hacky right now, but would appreciate feedback and another set of eyes looking at the output and any edge cases I may be missing.

Tyrrrz commented 4 years ago

I see you've closed the PR. Is this still relevant?

domn1995 commented 4 years ago

Was running into issues with the FTs running due to the culture of the date and time related types. I'm going to play with it a little more and reopen once it's fixed.

Tyrrrz commented 4 years ago

Okay sounds good.

domn1995 commented 4 years ago

All right @Tyrrrz I got the pesky culture issue worked out. Like I said originally, this solution seems to be working great, but feels kind of hacky. I'd love your feedback on it!

Tyrrrz commented 4 years ago

Could you also make a screenshot of the end result?

domn1995 commented 4 years ago

(Default text) only image

Description + environment variable + (default value) image This looks really weird without parens around the environment variable, so here's another with parens around it. I think it looks a lot better.

Description + (environment variable) + (default value) image

domn1995 commented 4 years ago

@Tyrrrz, ready for another look.

Tyrrrz commented 4 years ago

Maybe instead of parens we could use something like this?

--option Some description. Environment variable: "ENV_FOO". Default: "bar".

So quote everything regardless of spaces, that way there's a bit less visual noise imo.

Tyrrrz commented 4 years ago

Merged 🎉 I'll see how to improve it from here.