Comments (5)
This may get dropped as I'm not sure toml is the best way to represent an app structure unless it's dynamically generated somehow...TBD
from clap.
I'm not sure toml is the best way to represent an app structure unless it's dynamically generated somehow...
What exactly is the problem? TOML allows nesting as well, but keeps it flat:
subcommands:
- subcmd:
about: demos subcommands from yaml
version: "0.1"
author: Kevin K. <[email protected]>
args:
- scopt:
short: B
multiple: true
help: example subcommand option
takes_value: true
- scpos1:
help: example subcommand positional
index: 1
would be
[subcommands.subcmd]
about = "demos subcommands from yaml"
version = "0.1"
author = "Kevin K. <[email protected]>"
[subcommands.args.scopt]
short = "B"
multiple = true
help = "example subcommand option"
takes_value = true
[subcommands.args.scpos1]
help = "example subcommand positional"
index = 1
from clap.
@vks it's not that it doesn't support it, it's that unless you're dynamically generating that, it would be a pain to write. YAML on the other hand pretty short and easy to read / mentally parse. Granted that a personal opinion, and if it's not shared I'd be happy to merge TOML support as well...I just don't have the bandwidth right now to add it 😜
from clap.
@kbknapp I think if we used serde we would get both YAML and TOML (and others).
from clap.
Potentially yes, I haven't worked with serde in quite a while, so I'd have to hit the books again to see how much work it'd be. I'm not opposed to it by any means, other than I'd like to keep these features working on stable and not have to require nightly.
from clap.
Related Issues (20)
- Delegate completions for a specific argument to the completions of an external program HOT 3
- Visually Separate ArgGroups HOT 2
- Support Base Path for ValueHint::*Path types HOT 1
- Clap-generated shell completion failing on macOS /bin/bash with: conditional binary operator expected: syntax error near `IFS' HOT 3
- `flatten` with `required` breaks requirement checking HOT 1
- `demo.rs` does not compile on its own HOT 4
- Multilingual Help Commands HOT 2
- Environment variable name aliases HOT 1
- Arg dynamic completion via `ValueHint::Execute(String)` HOT 1
- Optional flag argument conflicts with required subcommand HOT 2
- clap_complete: `generate()` shouldn't panic if writing fails
- Make visible_alias print in a way that fits convention HOT 4
- Support multiple positionals with fixed sizes HOT 1
- Hidden subcommands shown when "requires a subcommand but one was not provided" HOT 1
- No clap_derive for latest clap HOT 2
- Add the Ability to Display Visible Aliases for PossibleValues HOT 1
- `ArgAction::Count` starts from `0` rather than `default_value` HOT 6
- Allow API users to deprecate args HOT 1
- Check for group of repeated arguments
- Inconsistencies in short helps (`-h`) use of long help
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 clap.