GithubHelp home page GithubHelp logo

Comments (3)

c-blake avatar c-blake commented on June 25, 2024

Hey, Mamy. Thanks. Glad you like it. Your code looks good. I should probably have some example code for doing enums.

from cligen.

c-blake avatar c-blake commented on June 25, 2024

Hey. So, I added generic support for any enums. See test/Enums.nim. I have also changed things in a few backward incompatible ways for people defining their own argParse/argHelp like you (see RELEASE_NOTES.md) and added support for seq[T] for almost all the regular T supported by argcvt. I ran into some trouble supporting seq[enum], though...Internal compiler error. Similar generic support for set[T] is probably not so bad, but not as widely applicable since T is more restricted. The internal error has me regretting a bit using templates instead of generic functions, but then the way I let CLI authors pick both the value and type of seqDelimit has me not regretting.

from cligen.

c-blake avatar c-blake commented on June 25, 2024

Ok. Both any enums and any sets of enums should just work by default now. You should be able to just comment out/delete your definitions. There is also a new "+="/"-=" syntax for updating existing values as in --licenses+=MIT. So, I am closing this issue.

I don't know if you have any other user-defined argParse and argHelp, but there have been major changes in how they work. See RELEASE_NOTES.md or argcvt.nim or DETAILS.md. I will soon tag some new release version to cover that backward incompatibility.

from cligen.

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.