Comments (3)
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.
@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.
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)
- Replace `ParseError`/string errors with `Error` and use generally HOT 7
- Create error reporting output HOT 1
- [Proposal] Validation
- Some naming and organizational issues
- [Proposal] Diagramming
- [Proposal] Remove `TreatUnmatchedTokensAsErrors` HOT 7
- HostingAction for options handlers HOT 3
- HostingAction wrapper does not honor Terminating flag of original action
- [Proposal] Unifying public parts of ArgumentResult and OptionResult to ValueResult and isolating parser support HOT 2
- [Proposal] ValueSubsystem - default values HOT 1
- BinderBase functionality replacement HOT 1
- Required command was not provided on `RootCommand` HOT 6
- [Proposal] Values API HOT 1
- EnvironmentDirective has a hard-coded call to Environment.SetEnvironmentVariable making it hard to test
- Breaking changes for Powderhouse
- Usage root command does not display `ToolCommandName` HOT 1
- [Breaking] Remove CommandResult HOT 6
- Powderhouse support for .NET versions
- Tracking issue for Error changes
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 command-line-api.