Git Product home page Git Product logo

Comments (10)

Canop avatar Canop commented on May 18, 2024 2

Examples here: https://dystroy.org/bacon/cookbook/#variable-arguments

from bacon.

Canop avatar Canop commented on May 18, 2024 1

It seems to work.

from bacon.

Canop avatar Canop commented on May 18, 2024

As noticed by @jyn514 , the current argh doesn't make that easy, so args parsing would have to be changed.

from bacon.

Stargateur avatar Stargateur commented on May 18, 2024

TODO: check if clap brand new version 3 handle it. I believe 2 already handle this.

from bacon.

Canop avatar Canop commented on May 18, 2024

If you find out how it's done in clap3, I'm interested.

from bacon.

Stargateur avatar Stargateur commented on May 18, 2024

Look perfect https://github.com/clap-rs/clap/blob/master/examples/escaped-positional-derive.md

code: https://github.com/clap-rs/clap/blob/master/examples/escaped-positional-derive.rs

from bacon.

Canop avatar Canop commented on May 18, 2024

This "escaped positional derive" example looks good enough. I'll check ASAP. I hope the bacon executable won't be twice as big from the clap crate.

from bacon.

Stargateur avatar Stargateur commented on May 18, 2024

I hope the bacon executable won't be twice as big from the clap crate.

If you are talking about this from argh

Derive-based argument parsing optimized for code size

I believe it's about code size not binary size. Mainly what they mean is "we offer derive feature". clap 3 is mainly about having derive feature avoiding code size that was needed when using clap 2.

Anyway rust bin are pretty big and I don't expect clap to change the size much.

from bacon.

Canop avatar Canop commented on May 18, 2024

@Stargateur just using clap3 instead of argh makes bacon go from 4.8M to 5.2M. It's probably acceptable for bacon but I've dropped clap from smaller applications in the past as it made them double in size

from bacon.

Canop avatar Canop commented on May 18, 2024

A question regarding this feature: should those additional arguments be also added to other jobs launched with shortcuts ? Answer doesn't seem obvious and it may limit the usability of this change. I'll start with a yes.

from bacon.

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.