Skip to content

Commit

Permalink
Release of 2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matejak committed Jan 26, 2019
1 parent a731a40 commit f36bf7c
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 19 deletions.
10 changes: 7 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
2.8.0 (TBA)
2.8.0 (2019-01-26)
-----------

New features:

* 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.
* Double quotes in help messages are escaped (fixes #61).
* Implemented output to generate manpages using the `rst2man` utility (fixes #37).
* Introduced the `ARG_VERSION_AUTO` macro.
* Enabled manpage output consumable by the `rst2man` utility.

Bugfixes:

* Double quotes in help messages are escaped (fixes #61).
* Fixed regression that allowed duplicate short options (fixes #58).


2.7.1 (2018-08-15)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Following outputs are available:
- POSIX scripts that use `getopts`, also tailor-made.
- Bash completion.
- [docopt](https://docopt.org)-compliant usage message.
- Manpage output using [rst2man](http://docutils.sourceforge.net/sandbox/manpage-writer/rst2man.txt).

The utility has been inspired by Python's `argparse` and the `shflags` project.

Expand Down
6 changes: 3 additions & 3 deletions bin/argbash
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.7.1 one line above ###
### START OF CODE GENERATED BY Argbash v2.8.0 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down Expand Up @@ -187,11 +187,11 @@ parse_commandline()
exit 0
;;
-v|--version)
printf '%s %s\n\n%s\n' "argbash" "2.7.1" 'Argbash is an argument parser generator for Bash.'
printf '%s %s\n\n%s\n' "argbash" "2.8.0" 'Argbash is an argument parser generator for Bash.'
exit 0
;;
-v*)
printf '%s %s\n\n%s\n' "argbash" "2.7.1" 'Argbash is an argument parser generator for Bash.'
printf '%s %s\n\n%s\n' "argbash" "2.8.0" 'Argbash is an argument parser generator for Bash.'
exit 0
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions bin/argbash-1to2
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# shellcheck disable=SC2016
# SC2016: Expressions don't expand in single quotes, use double quotes for that.

version=2.7.1
version=2.8.0
# ARG_POSITIONAL_INF([input],[The input file to transform],[1])
# ARG_OPTIONAL_SINGLE([output],[o],[Name of the output file (pass '-' for stdout and empty string for the same as input file)],[""])
# ARG_VERSION([echo "argbash-1to2 v$version"])
# ARG_HELP([Convert a template for argbash>=1,<2 to argbash>=2,<3])

# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.7.1 one line above ###
### START OF CODE GENERATED BY Argbash v2.8.0 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down
4 changes: 2 additions & 2 deletions bin/argbash-init
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SC2001: See if you can use ${variable//search/replace} instead.
# SC2016: Expressions don't expand in single quotes, use double quotes for that.

version=2.7.1
version=2.8.0
# ARG_POSITIONAL_SINGLE([output],[Name of the output template],[-])
# ARG_OPTIONAL_INCREMENTAL([separate],[s],[Separate the parsing logic (specify two times for complete separation)])
# ARG_OPTIONAL_BOOLEAN([hints],[],[Whether to write hints to the script template])
Expand All @@ -19,7 +19,7 @@ version=2.7.1

# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.7.1 one line above ###
### START OF CODE GENERATED BY Argbash v2.8.0 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down
2 changes: 1 addition & 1 deletion doc/_static/argbash-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
argbash 2.7.1
argbash 2.8.0

Argbash is an argument parser generator for Bash.
1 change: 1 addition & 0 deletions doc/_static/wrapper-output-action.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Contents of '../src' matching '*.m4':
output-bash-script.m4: 1 kiB
output-completion.m4: 4 kiB
output-docopt.m4: 0 kiB
output-manpage-defs.m4: 1 kiB
output-manpage.m4: 1 kiB
output-posix-script.m4: 3 kiB
output-strip-all.m4: 0 kiB
Expand Down
1 change: 1 addition & 0 deletions doc/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ So let's get back to argument types.
Below, is a list of argument types and macros that you have to write to support those (e.g. ``ARGBASH_GO`` is a macro and ``ARG_OPTIONAL_BOOLEAN([verbose], [Verbose mode])`` is a macro called wit two arguments --- ``verbose`` and ``Verbose mode``).
Place those macros in your files as ``bash`` comments.


Your script
-----------

Expand Down
2 changes: 1 addition & 1 deletion resources/examples/minimal-raw.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# m4_ignore(
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
exit 11 #)Created by argbash-init v2.7.1
exit 11 #)Created by argbash-init v2.8.0
# ARG_OPTIONAL_SINGLE([option])
# ARG_OPTIONAL_BOOLEAN([print])
# ARG_POSITIONAL_SINGLE([positional-arg])
Expand Down
2 changes: 1 addition & 1 deletion resources/examples/minimal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# m4_ignore(
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
exit 11 #)Created by argbash-init v2.7.1
exit 11 #)Created by argbash-init v2.8.0
# ARG_OPTIONAL_SINGLE([option], o, [A option with short and long flags and default], [boo])
# ARG_OPTIONAL_BOOLEAN([print], , [A boolean option with long flag (and implicit default: off)])
# ARG_POSITIONAL_SINGLE([positional-arg], [Positional arg description], )
Expand Down
2 changes: 1 addition & 1 deletion resources/examples/simple-parsing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# ARGBASH_SET_INDENT([ ])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.7.1 one line above ###
### START OF CODE GENERATED BY Argbash v2.8.0 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down
4 changes: 2 additions & 2 deletions resources/examples/simple-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# ARGBASH_SET_INDENT([ ])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.7.1 one line above ###
### START OF CODE GENERATED BY Argbash v2.8.0 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

Expand Down Expand Up @@ -135,7 +135,7 @@ assign_positional_args 1 "${_positionals[@]}"

# OTHER STUFF GENERATED BY Argbash
_args_simple_parsing=("${_args_simple_parsing_opt[@]}" "${_args_simple_parsing_pos[@]}")
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || die "Couldn't determine the script's running directory, which probably matters, bailing out" 2
script_dir="$(cd "$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")" && pwd)" || die "Couldn't determine the script's running directory, which probably matters, bailing out" 2

### END OF CODE GENERATED BY Argbash (sortof) ### ])
# [ <-- needed because of Argbash
Expand Down
4 changes: 2 additions & 2 deletions resources/examples/simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# INCLUDE_PARSING_CODE([simple-parsing.sh])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.7.1 one line above ###
### START OF CODE GENERATED BY Argbash v2.8.0 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info

# OTHER STUFF GENERATED BY Argbash
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || die "Couldn't determine the script's running directory, which probably matters, bailing out" 2
script_dir="$(cd "$(dirname "$(readlink -e "${BASH_SOURCE[0]}")")" && pwd)" || die "Couldn't determine the script's running directory, which probably matters, bailing out" 2
. "$script_dir/simple-parsing.sh" # '.' means 'source'


Expand Down
2 changes: 1 addition & 1 deletion src/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.1
2.8.0

0 comments on commit f36bf7c

Please sign in to comment.