Argbash 2.10.0

Do you write Bash scripts that are supposed to accept arguments? Aren't you tired of that? getopt is discouraged, getopts doesn't support long options, there is no widely-accepted Bash module to do the task and some solutions don't work on all platforms (Linux, OSX, MSW)... Give a Argbash a try, benefit from the online generator and stop being terrorized by those pesky arguments!

Tags bash shell code-generator developers
License BSDL
State stable

Recent Releases

2.10.023 Sep 2020 06:25 minor feature: argbash-init is able to handle empty string as the only argument without being puzzled. Error handling of script working directory detection now more robust. Argbash in the container has no longer the terminal output limitation caused by the crlf line ending. Thanks to Felipe Santos!. The ARG_USE_PROG implementation was missing. Therefore, it was implemented as ARG_USE_PROGRAM using a slightly different interface.
2.9.001 Aug 2020 16:05 minor feature: typo in argbash-init and updated obsolete/incaccurate hints. incorrect permission of non-script output files. Increased MacOS compatibility by removing terminator from the chmod invocation. Increased flexibility of the help option. Improved argbash-init script template. Increased flexibility of the version option. Added a convenience function for module loading. Added a possibility to the argbash tool to generate the script in-place, exposed as the -i option.
2.8.101 Jul 2019 06:45 minor feature: The DEFINE_SCRIPT_DIR macro doesn't resolve symlinks as it started to do so in 2.8.0, use DEFINE_SCRIPT_DIR_GNU if you need the functionality. The help message now contains reference for one-of argument types. The environment variables help message has been. The manpage generation works when long description is supplied. The DEFINE_SCRIPT_DIR macro doesn't use readlink -e any more. Completion generation works even when there are no options followed by value.
2.8.027 Jan 2019 12:25 minor feature: Allow argbash and argbash-init to be run from symbolic links. Allow scripts generated by argbash-init with complete separation (-s -s) to be run from a symbolic link. Implemented output to generate manpages using the rst2man utility. Introduced the ARG_VERSION_AUTO macro. Double quotes in help messages are escaped. regression that allowed duplicate short options.
2.7.115 Aug 2018 00:00 minor feature: This version of Argbash improves the bash completion code, as well as the docopt output. Aside from that, some build issues are fixed.
2.7.018 Jul 2018 23:11 minor feature: This version of Argbash brings the long-awaited POSIX shell output mode. The generated code uses the getopts builtin if applicable, and although it doesn't support all features of full Bash script output, the most common functionality works.
2.6.104 Mar 2018 08:25 minor feature: The installation related to bash completion. Allowed docopt and completion output even in case of stdin input and stdout output.
2.6.028 Feb 2018 00:41 major feature: New features: elementary support for bash completion, docopt-compliant help message, new argbash command-line options.
2.6.0a28 Jan 2018 03:17 minor feature: Argbash-init corner cases (wrong output filename). Corrected argbash-init hint mode. Allowed argbash to wrap scripts in files with no extension. Compatibility with the -e (i.e. "strict") mode.
2.5.108 Dec 2017 05:25 minor feature: Argbash-init corner cases (wrong output filename). Corrected argbash-init hint mode. Allowed argbash to wrap scripts in files with no extension. Compatibility with the -e (i.e. "strict") mode.
2.5.003 Sep 2017 17:02 major feature: New features: * The generated shell `case` statement is considerably nicer. * Argbash functionality is now encapsulated in shell functions. * Short options can be also numeric. * Introduced DIY mode as a preview feature. * A Docker image of argbash is available on Docker hub https://hub.docker.com/r/matejak/argbash/! Bugfixes: * Improved UX. * Much-improved handling of typed arguments. * Improved documentation.
2.4.010 Apr 2017 17:41 major feature: If you let argbash to generate your argument parsing code, it will know all the tricks that scripts that use getopt. New features: * Implemented getopts-like behavior (so e.g. `-gIinclude` equals to `-g -I include` etc.). * Improved feedback in case of mismatch between expected / received arguments. Bugfixes: * Argbash-powered scripts with positional arguments can be sourced consecutively without having to manually perform variable reset. * Fixed issue #7 with newlines in help strings.
2.3.007 Feb 2017 21:41 minor feature: New features: Behavior that raises an error when a script argument's value looks like option - enabled by the ARG_RESTRICT_VALUES. New minor features: argbash provides more useful feedback in case of unmatched square brackets in the input argbash in standalone mode now uses the more fresh of the parsing code .sh or .m4 templates (was undocumented, but the .sh one was always preferred over the .m4).
2.2.318 Dec 2016 03:16 minor feature: Added the --mode option to argbash-init. Improved help messages for arguments with typed values (experimental). quoting-related of the underlying code.
2.2.223 Nov 2016 20:45 minor feature: KILLER FEATURE: Introduced the argbash-init simple template generator. argbash can read from stdin. ARG_HELP gains second argument. Preview (preliminary) support for argument values types (a.k.a. typed arguments). Improved defaults indications in help messages. Overall internal code beautification.
2.2.009 Nov 2016 18:25 minor feature: KILLER FEATURE: Introduced the argbash-init simple template generator. argbash can read from stdin. ARG_HELP gains second argument. Preview (preliminary) support for argument values types (a.k.a. typed arguments). Improved defaults indications in help messages. Overall internal code beautification.
2.1.127 Aug 2016 19:24 major feature: Support for configuration of argument-value delimiters (space and equal sign are supported: --some-opt=value as well as --some-opt value can be configured to work), various bug fixes.
2.0.003 Aug 2016 20:45 minor feature: The variable name in which argument values are stored is different (lowercase) as the bash style guides recommend. a error handling in the argbash-1to2 script.
1.3.025 Jul 2016 08:05 minor feature: Support for infinitely many (and leftover) arguments. Partial POSIX shell compatibility. definitions in the parsing part of the script. Expanded documentation --- expanded info about related projects.
1.2.009 Jul 2016 09:25 minor feature: Support for repeated arguments, added specialized macro for --verbose. Support for double dash (separating positional and optional arguments). Support for multi-valued arguments (with defaults). Improved generated code so users get more descriptive messages when something goes wrong. The bash code tries to be minimal - only features that are used are supported. Support for wrapping of other Argbash scripts. Support for repeated arguments (s.a. argument -I of gcc). installation when ROOT variable was not treated properly. Improved error reports when number of positional args doesn't match. Improved m4s list implementation. Added m4_list_contains.
1.1.006 Sep 2015 23:02 major feature: New features: Support for positional args with default values. "Intelligent" shell auto-quoting of macro arguments. Improvement of standalone parsing code mode.
1.0.125 Aug 2015 03:15 minor feature: Updated PKGBUILD generation.
1.0.021 Aug 2015 11:05 minor feature: