We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following example prints the usage and exits, instead of correctly parsing the arguments.
const {docopt} = require("docopt") const usage = ` A description for my_program Usage: my_program (--param1 PARAM1 | -x PARAM1) (--param2 PARAM2 | -y PARAM2) [--db DB] [--user USER | -u USER] [--password PASSWORD | -p PASSWORD] my_program (-h | --help | -v | --version) Options: -h --help Print this help message -v --version Print version ` const argv = docopt(usage, { argv: ['--param1', 'P1', '--param2', 'P2'], version: '1.0.0' }) console.log(argv)
Expected output:
The python version works
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following example prints the usage and exits, instead of correctly parsing the arguments.
Expected output:
The python version works
The text was updated successfully, but these errors were encountered: