Comments (3)
Hey, Mamy. Thanks. Glad you like it. Your code looks good. I should probably have some example code for doing enum
s.
from cligen.
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.
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)
- Unhelpful compilation error when "short" param name is given as string HOT 5
- `parseHelps` fails on a single element HOT 6
- FR: Display textual representations of available enum values in the `clValType` column HOT 9
- How do I make global options? HOT 14
- [Bug] nim 1.0.6/1.4.8 doesn't have isNaN/isnan HOT 3
- How to use `--version`? HOT 4
- truncate default args in help menu HOT 5
- Sharing param help messages between commands HOT 2
- Some tiny remarks HOT 1
- Removing entries from a seq results in a non-zero exit HOT 10
- Setting `clCfg.helpSyntax = ""` doesn't prevent inclusion of the syntax into the binary HOT 15
- No error for passing non-static table to `help` or `short` of `dispatch` HOT 1
- No interpolation of const values in a literal passed to `help` or `short` of `dispatch` HOT 9
- [Feature request] Support for std/options HOT 7
- Sync `clCfg.version` with package HOT 3
- turning off prefix completion? HOT 14
- How to bold usage and clCfg.useHdr text from code? HOT 16
- `--help` on the multicommand programs without the command should at least list the available commands HOT 13
- "Bad enum value" response starts to and then doesn't list alternatives to the empty string HOT 2
- `strUt` requires Nim 1.2+ HOT 1
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 cligen.