Git Product home page Git Product logo

Comments (3)

KalleOlaviNiemitalo avatar KalleOlaviNiemitalo commented on June 11, 2024

Will it support homonymous options in a parent command and its subcommand? Like how git -c core.safecrlf=warn commit -c HEAD -a has two occurrences of -c with different meanings.

from command-line-api.

KathleenDollard avatar KathleenDollard commented on June 11, 2024

@KalleOlaviNiemitalo If I understand the question, each command has an explicit option attached. The change proposed here is that all options are always explicitly attached.

Each subsystem has an Initialize method that runs before parsing. One of the reasons for that step is to attach symbols. There is an open issue that the Help subsystem needs to add the help option (they can reuse the same option) explicitly.

It also has an Execute method which does the actual work. Symbols do not have actions in the Powderhouse design because invocation is not part of the core parser.

If I understand your question - yes that will work just fine. Thanks for asking. Those kinds of questions are super helpful right now.

from command-line-api.

Viir avatar Viir commented on June 11, 2024

Nice! I appreciate the reduction of magic making things more explicit in the configuration.

Explicitly stating that I want to map all subcommands (maybe supplying a predicate to decide whether to descend into a subtree) feels more natural.

from command-line-api.

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.