Comments (7)
Hi, I'm finally here!
So let me understand...
The parser already prints out the help screen if it fails, even if app termination is up to you.
I think that you want something in the style of HelpText.AutoBuild capable of parse or quit. If parsing fails, hence app can be terminated, help is print out. Now if no help stuff is defined (metadata, getusage etc) the lib should at least generate a stub screnn using all it can use (shortName/longName, reflection data, options rules).
Am I on the point?
Mmmm... It sounds very interesting... Any other opinion?
Giacomo
from commandline.
Yes, I think you've got it. This is purely for convenience -- it's relatively easy to do, but in pretty much every command line app I've seen a parsing error causes the app to print out a help message and quit.
from commandline.
wonderful...
there's only one point... if it is a convenience method a short message should be a sufficient for start, but what if it uses a new HelpText::AutoBuild capable of automatically produce something even if OptionAttribute::HelpText is leaved null?
from commandline.
I am of the opinion that the HelpText shouldn't be optional and AutoBuild should always be used to generate the help text (unless otherwise specified). Again, I feel most users will want a user-friendly help message accessible by default so why not go the extra step and do it automatically?
Of course I'm just speculating that "most" users will want this. My research has all been done using a sample size of 1 ( me :D ). I know I would be very appreciative of such a feature.
from commandline.
I also think such feature should be included.
More over I don't see a problem keeping the use of AutoBuild as something you can or you can't use... But I'll see when implementing (writing a little paragraph of spec in my mind before!)... :D
Bye
from commandline.
@nemec, also if a bit off-topic in the last post of this thread you say that the help module (HelpText
+ CommandLine.Text.*
) shouldn't be optional.
You're right. I'm changing my mind of some outdated principle that guided some part of the design.
As a fact, sources are now splitted.
The only thing I want to keep is source inclusion simple (copy the tree -> show all files -> include in project -> and you're done). I'm not satisfied with the add of #define
s to the project.
I'm gonna follow your suggestion. No one part of the source will be optional. After all it is open source, if someone want to hack it and strip it down is always possible (and easy).
This will open the way to "strict parsing". A simple request, but if I have to keep it optional too, I had to add other prepreoc directives. (And will not do that!) This explains the delay!
Thanks! Giacomo
from commandline.
We got it in 1.9.4.107!!! :D
from commandline.
Related Issues (20)
- Support for default verb? HOT 7
- Is version 2 still beta? HOT 3
- Cannot use 2 verbs at the same time HOT 5
- Mutual exclusive option is not enforced (even when settings.MutuallyExclusive == true) HOT 3
- Has the approach to verbs in v2 changed? HOT 6
- THIS REPO GOING DEFUNCT, please submit issues/pull requests to https://github.com/commandlineparser/commandline HOT 2
- Argument value with dash not accepted when using single-dash key HOT 1
- Good, except parsing doesn't work HOT 1
- Parser state HOT 1
- Using --help HOT 1
- Inverse order of FlatternHierarchy HOT 1
- Enum Parsing Is Failing HOT 2
- Migrating from 2.3.0 to 2.4.3 HOT 3
- Please support older .NET framework versions
- Unable to parse TimeSpan given from FormatCommandLine HOT 2
- Order of options where there are list options and values HOT 1
- Group where none or all options must be provided HOT 1
- Fast HOT 1
- (Tool's);
- Tv
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commandline.