Consider adding PropertiesDefaultProvider implementation
See original GitHub issueConsider including the PropertiesDefaultProvider
implementation of the IDefaultValueProvider
interface in the picocli distribution.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
picocli - a mighty tiny command line interface
From picocli 4.1, applications can use the built-in PropertiesDefaultProvider implementation that loads default values from a properties file. By default, this ...
Read more >In picocli how do you make options on the command line to ...
PropertiesDefaultProvider looks for the file in the following locations: the path specified by system property picocli.defaults.${COMMAND-NAME}.
Read more >CommandLine (picocli 4.1.2 API) - Javadoc.io
CommandLine interpreter that uses reflection to initialize an annotated user object with values obtained from the command line arguments.
Read more >CommandLine (owl 21.0 API)
Modifier and Type Method Description
CommandLine addSubcommand(String name, Object command) Registers...
CommandLine.ParseResult getParseResult()
List parse(String... args) Deprecate...
Read more >RELEASE-NOTES.md · fanwen/picocli - Gitee.com
[#868] (Enhancement) Add built-in default value provider implementation `PropertiesDefaultProvider` that loads default values from properties file in home ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t have a specific use case at the moment. My suggestions are not easily implementable, in my opinion, unless the property file descriptors are annotated parameters. That’s why you need two passes at this point.
I’m satisfied with the examples listed as prior art in the documentation. I’ll share any more interesting ones should I encounter them.
I’m inclined to agree with you. That was my initial reaction when I first discovered Pretty Printer as well. It still requires two passes. I , somehow, got the impression that it’d take four passes. Maybe, I wasn’t thinking too clearly. It depends on how many command-line implementations do something similar. If it’s uncommon, it’s best to let the application developer do it. If it’s increasingly common, then it becomes expected behaviour. Then, the API might need to provide that.