rbardou / clap Goto Github PK
View Code? Open in Web Editor NEWCommand-Line Argument Parsing, imperative style with a consumption mechanism.
License: MIT License
Command-Line Argument Parsing, imperative style with a consumption mechanism.
License: MIT License
In some similar libraries, one can specify environment variables from which the value of some command-line arguments can be read if those arguments are not specified (or in addition?).
This seems rather straightforward to implement and could thus be useful.
Currently, defining multiple arguments with the same name is allowed. Once the first is consumed, the second can be consumed, which makes sense with the semantics of Clap. However, in practice it's usually a mistake.
One could add ?check_duplicates
to Clap.close
, defaulting to true
, that would go through the list of registered arguments and check that there are no duplicates.
I'm trying to install the latest version of Clap pinned to git master: opam pin add --dev-repo clap
.
Currently, this is not possible, because dune-project
file is missing and explicitly added to .gitignore
.
So I get the following error:
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[clap.0.1.0] no changes from git+https://github.com/rbardou/clap.git
The following actions will be performed:
∗ install clap 0.1.0*
[clap.0.1.0] synchronised from git+https://github.com/rbardou/clap.git
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of clap failed at "C:\\OCaml64\\home\\jbz\\.opam\\4.11.1+mingw64c\\bin\\dune.exe subst".
#=== ERROR while compiling clap.0.1.0 =========================================#
# context 2.0.7 | win32/x86_64 | ocaml-variants.4.11.1+mingw64c | pinned(git+https://github.com/rbardou/clap.git#064ca69f)
# path ~/.opam/4.11.1+mingw64c/.opam-switch/build/clap.0.1.0
# command C:\OCaml64\home\jbz\.opam\4.11.1+mingw64c\bin\dune.exe subst
# exit-code 1
# env-file ~/.opam/log/clap-10764-e7966f.env
# output-file ~/.opam/log/clap-10764-e7966f.out
### output ###
# Error: dune-project: No such file or directory
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build clap 0.1.0
└─
╶─ No changes have been performed
Could you please add a dune-project
file to git?
It would be enough to have something simple like:
(lang dune 2.9)
(name clap)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.