argbash - Man Page

Argbash is an argument parser generator for Bash.

Synopsis

argbash  [--output OUTPUT] [--in-place] [--type type] [--library] [--strip content] [--check-typos] [--commented] [--search SEARCH]... [--debug DEBUG] [--help] [--version] <input>

Description

Argbash is a code generator that typically generates a bash argument-parsing library tailor-made for your script. It lets you to describe arguments your script should take and then, you can generate the bash parsing code. It stays in your script by default, but you can have it generated to a separate file and let bash to include it in your script for you. Argbash is very simple to use and the generated code is relatively nice to read. Moreover, argument definitions stay embedded in the script, so when you need to update the parsing logic, you just re-run the argbash script on the already generated script.

Arguments

-o OUTPUT--output OUTPUT

Name of the output file (pass '-' for stdout). [Default: -]

-i,  --in-place

Update a bash script in-place. [Default: off]

|OPTION_IN_PLACE|
-t bash-script|posix-script|manpage|manpage-defs|completion|docopt, --type bash-script|posix-script|manpage|manpage-defs|completion|docopt Output type to generate.

[Default: bash-script]

Check out the documentation to learn about all argbash capabilities that are supported.

--library

Whether the input file if the pure parsing library. [Default: off]

This option is deprecated and it is the same as --strip user-content.

--strip none|user-content|all Determines what to have in the output.

[Default: none]

You can either strip none, which is useful for scripts. If you strip user-content, you keep the Argbash header. If you strip all, you will have only the generated content in the result.

--check-typos

Whether to check for possible argbash macro typos. [Default: on]

-c,  --commented

Commented mode - include explanatory comments with the parsing code. [Default: off]

-I SEARCH--search SEARCH

Directories to search for the wrapped scripts (directory of the template will be added to the end of the list). [Default: "."]

--debug DEBUG

(developer option) Tell autom4te to trace a macro.

-h,  --help

Prints help.

-v,  --version

Prints version.

Docutils System Messages

System Message: ERROR/3 (argbash.rst:, line 42)

Undefined substitution referenced: "OPTION_IN_PLACE".

Author

Matěj Týč

Info

2024-07-17 argbash 2.10.0