Giter Club home page Giter Club logo

Comments (7)

DartBot avatar DartBot commented on July 21, 2024

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


Well, I found this in the API docs:

By default, the parse() method stops as soon as it reaches -- by itself or anything that the parser doesn't recognize as an option, flag, or option value. If arguments still remain, they go into ArgResults.rest.

Which looks like it can help me today.

from args.

DartBot avatar DartBot commented on July 21, 2024

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


After playing around the -- doesn't help me because the tools generate the command-line, and they don't put their args after --.

So I think I need a "ignore unspecified args" option for ArgParser.

from args.

DartBot avatar DartBot commented on July 21, 2024

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


Will you accept a patch for such a feature?


cc @munificent.

from args.

DartBot avatar DartBot commented on July 21, 2024

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Args has an option now to ignore unspecified arguments, but not unrecognized options. The former lets you have options that appear after non-option arguments. For example:

$ myapp some/file.txt --option

Args can skip over some/file.txt and parse --option. But it doesn't do that for things that look like options (i.e. a leading "-").

I'd be fine with a patch for the latter too, provided it was an opt-in feature. I'm thinking add a "ignoreUnknownOptions" argument to parse().

from args.

DartBot avatar DartBot commented on July 21, 2024

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


Thanks Bob. ignoreUnknownOptions as an opt-IN would work. Good to know you'd accept a patch. :)

from args.

DartBot avatar DartBot commented on July 21, 2024

<img src="https://avatars.githubusercontent.com/u/3276024?v=3" align="left" width="48" height="48"hspace="10"> Comment by anders-sandholm


Removed Library-Args label.
Added Pkg-Args label.

from args.

DartBot avatar DartBot commented on July 21, 2024

<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd


Now at #9


Added MovedToGithub label.

from args.

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.