Coder Social home page Coder Social logo

Comments (7)

gsscoder avatar gsscoder commented on September 7, 2024

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.

nemec avatar nemec commented on September 7, 2024

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.

gsscoder avatar gsscoder commented on September 7, 2024

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.

nemec avatar nemec commented on September 7, 2024

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.

gsscoder avatar gsscoder commented on September 7, 2024

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.

gsscoder avatar gsscoder commented on September 7, 2024

@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 #defines 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.

gsscoder avatar gsscoder commented on September 7, 2024

We got it in 1.9.4.107!!! :D

from commandline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.