question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: provide default value for option (and show it in the help)

See original GitHub issue

Apologies if I’ve missed this one. I see in the examples you’re using conditionals to set default values, but what about providing something like

[Option(Description = "Verbosity",DefaultValue = 5)] so when an option is not required a default value is supplied - this could also be reflected in the help text so we’re following the Principle of Least Astonishment.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
meywdcommented, Sep 12, 2021

@natemcmaster First thank you for this library, its really helpful.

Regarding Default values, since this is in beta, I think the sample code at the front page shouldn’t include DefaultValue or at least add a comment saying that its in beta, to not confuse users.

1reaction
natemcmastercommented, Jan 18, 2021

This issue is resolved and available now in this beta: https://www.nuget.org/packages/McMaster.Extensions.CommandLineUtils/4.0.0-beta.56. Please take a look and let me know if you have feedback on its behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

provide default value for option (and show it in the help)
Apologies if I've missed this one. I see in the examples you're using conditionals to set default values, but what about providing something...
Read more >
Default value in forms - Feature Requests - Glide Community
The default value could be an option like the placeholder text in features. ... I suggest you add them to the feature request...
Read more >
Set a default value for a custom property
Hi friends!! I have a custom property as a dropdown select which now it's binary (we don't know if it will handle other...
Read more >
Feature request: default value in Lookup fields
I would like to be able to give a lookup field a default value, so that the user can tab straight over it...
Read more >
Set a Default Value for Any Screen Component That ...
For example, to set the default value to both "Red" and "Blue", enter Red;Blue . At run time, we preselect every choice option...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found