docopt.sh - Bash argument parser generator.
Project description
docopt.sh
This software is still in early alpha. Not for production use.
docopt.sh - Bash argument parser generator.
This program looks for a docopt usage string
in a script and appends a matching parser to it.
Usage:
docopt.sh generate-library
docopt.sh [options] [SCRIPT]
Options:
--prefix PREFIX Parameter variable name prefix [default: ]
--line-length N Max line length when minifying (0 to disable) [default: 80]
--parser Output parser instead of inserting it in the script
--library -l PATH Generates only the dynamic part of the parser and includes
the static parts from a file located at PATH,
use `generate-library` to create that file.
-h --help This help message
--version Version of this program
Notes:
You can pass the script on stdin as well,
docopt.sh will then output the modified script to stdout.
If the script has a $version defined anywhere before the invocation of docopt
--version will automatically output the value of that variable.
$DOCOPT_PROGRAM_VERSION The string to print when --version is specified
(default: none/disabled)
$DOCOPT_ADD_HELP Set to `false` to not print usage on --help
(default: true)
$DOCOPT_OPTIONS_FIRST Set to `true` to fail when options are specified
after arguments/commands
$DOCOPT_TEARDOWN Set to `false` to prevent cleanup of
$docopt_ variables (default: true)
$DOCOPT_DOC_CHECK Set to `false` to disable checking
whether the parser matches the doc (default: true)
$DOCOPT_LIB_CHECK Set to `false` to disable checking whether the
library version and the docopt parser version match
Use docopt_error to exit with an error message and show the short usage
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
docopt-sh-0.9.1.tar.gz
(23.5 kB
view hashes)
Built Distribution
docopt_sh-0.9.1-py3-none-any.whl
(51.4 kB
view hashes)
Close
Hashes for docopt_sh-0.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27dde9a58637e271d96fc98c6038c39d65d0a36afe175dfdfec1865fe0d5c9e2 |
|
MD5 | a9d4e6af05f1f589b51e022e782d22a9 |
|
BLAKE2b-256 | fa864b7de9e6700ff263fb29c60cc2f0535774725782eebb229d7e555e9d8b8a |