Skip to content

Commit 850cabf

Browse files
committed
The 2.9.0 release.
1 parent 4587817 commit 850cabf

File tree

15 files changed

+46
-38
lines changed

15 files changed

+46
-38
lines changed

ChangeLog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
2.9.0 (TBA)
1+
2.9.0 (2020-08-01)
22
------------------
33

44
Buxfixes:

bin/argbash

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

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

@@ -201,11 +201,11 @@ parse_commandline()
201201
exit 0
202202
;;
203203
-v|--version)
204-
printf '%s %s\n\n%s\n' "argbash" "2.8.1" 'Argbash is an argument parser generator for Bash.'
204+
printf '%s %s\n\n%s\n' "argbash" "2.9.0" 'Argbash is an argument parser generator for Bash.'
205205
exit 0
206206
;;
207207
-v*)
208-
printf '%s %s\n\n%s\n' "argbash" "2.8.1" 'Argbash is an argument parser generator for Bash.'
208+
printf '%s %s\n\n%s\n' "argbash" "2.9.0" 'Argbash is an argument parser generator for Bash.'
209209
exit 0
210210
;;
211211
*)
@@ -495,7 +495,7 @@ then
495495
# match against suspicious, then inverse match against correct stuff:
496496
# #<optional whitespace>\(allowed\|another allowed\|...\)<optional whitespace><opening bracket <or> end of line>
497497
# Then, extract all matches (assumed to be alnum chars + '_') from grep and put them in the error msg.
498-
grep_output="$(printf "%s" "$output" | grep '^#\s*\(ARG_\|ARGBASH\)' | grep -v '^#\s*\(ARGBASH_SET_INDENT\|ARG_OPTIONAL_SINGLE\|ARG_VERSION\|ARG_VERSION_AUTO\|ARG_HELP\|ARG_OPTIONAL_INCREMENTAL\|ARG_OPTIONAL_REPEATED\|ARG_VERBOSE\|ARG_OPTIONAL_BOOLEAN\|ARG_OPTIONAL_ACTION\|ARG_POSITIONAL_SINGLE\|ARG_POSITIONAL_INF\|ARG_POSITIONAL_MULTI\|ARG_POSITIONAL_DOUBLEDASH\|ARG_OPTION_STACKING\|ARG_RESTRICT_VALUES\|ARG_DEFAULTS_POS\|ARG_LEFTOVERS\|ARGBASH_WRAP\|INCLUDE_PARSING_CODE\|DEFINE_SCRIPT_DIR\|DEFINE_SCRIPT_DIR_GNU\|ARGBASH_SET_DELIM\|ARGBASH_GO\|ARGBASH_PREPARE\|ARG_TYPE_GROUP\|ARG_TYPE_GROUP_SET\|ARG_USE_ENV\|ARG_USE_PROG\)\s*\((\|$\)' | sed -e 's/#\s*\([[:alnum:]_]*\).*/\1 /' | tr -d '\n\r')"
498+
grep_output="$(printf "%s" "$output" | grep '^#\s*\(ARG_\|ARGBASH\)' | grep -v '^#\s*\(ARGBASH_SET_INDENT\|ARG_OPTIONAL_SINGLE\|ARG_VERSION\|ARG_VERSION_AUTO\|ARG_HELP\|ARG_OPTIONAL_INCREMENTAL\|ARG_OPTIONAL_REPEATED\|ARG_VERBOSE\|ARG_OPTIONAL_BOOLEAN\|ARG_OPTIONAL_ACTION\|ARG_POSITIONAL_SINGLE\|ARG_POSITIONAL_INF\|ARG_POSITIONAL_MULTI\|ARG_POSITIONAL_DOUBLEDASH\|ARG_OPTION_STACKING\|ARG_RESTRICT_VALUES\|ARG_DEFAULTS_POS\|ARG_LEFTOVERS\|ARGBASH_WRAP\|INCLUDE_PARSING_CODE\|DEFINE_LOAD_LIBRARY\|DEFINE_SCRIPT_DIR\|DEFINE_SCRIPT_DIR_GNU\|ARGBASH_SET_DELIM\|ARGBASH_GO\|ARGBASH_PREPARE\|ARG_TYPE_GROUP\|ARG_TYPE_GROUP_SET\|ARG_USE_ENV\|ARG_USE_PROG\)\s*\((\|$\)' | sed -e 's/#\s*\([[:alnum:]_]*\).*/\1 /' | tr -d '\n\r')"
499499
test -n "$grep_output" && die "Your script contains possible misspelled Argbash macros: $grep_output" 1
500500
fi
501501
if test "$outfname" != '-'

bin/argbash-1to2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
# shellcheck disable=SC2016
44
# SC2016: Expressions don't expand in single quotes, use double quotes for that.
55

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

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

bin/argbash-init

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SC2001: See if you can use ${variable//search/replace} instead.
55
# SC2016: Expressions don't expand in single quotes, use double quotes for that.
66

7-
version=2.8.1
7+
version=2.9.0
88
# ARG_POSITIONAL_SINGLE([output],[Name of the output template],[-])
99
# ARG_OPTIONAL_INCREMENTAL([separate],[s],[Separate the parsing logic (specify two times for complete separation)])
1010
# ARG_OPTIONAL_BOOLEAN([hints],[],[Whether to write hints to the script template])
@@ -19,7 +19,7 @@ version=2.8.1
1919

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

@@ -363,7 +363,7 @@ do_script_separate()
363363

364364
do_body()
365365
{
366-
echo "# vvv PLACE YOUR CODE GOES HERE vvv"
366+
echo "# vvv PLACE YOUR CODE HERE vvv"
367367
if test "${#_variables[@]}" -gt 0; then
368368
echo "# For example:"
369369
for stat in "${_variables[@]}"

doc/_static/argbash-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
argbash 2.8.1
1+
argbash 2.9.0
22

33
Argbash is an argument parser generator for Bash.

doc/_static/minimal.patch

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
--- minimal-raw.m4 2017-12-06 23:51:13.985545630 +0100
2-
+++ minimal.m4 2017-12-06 23:54:30.169992192 +0100
3-
@@ -3,16 +3,22 @@
1+
--- minimal-raw.m4 2020-08-01 00:01:13.050519113 +0200
2+
+++ minimal.m4 2020-08-01 00:01:05.053955492 +0200
3+
@@ -3,20 +3,26 @@
44
# m4_ignore(
55
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
66
exit 11 #)Created by argbash-init v@VERSION@
77
-# ARG_OPTIONAL_SINGLE([option])
88
-# ARG_OPTIONAL_BOOLEAN([print])
99
-# ARG_POSITIONAL_SINGLE([positional-arg])
10-
-# ARG_DEFAULTS_POS
11-
-# ARG_HELP([<The general help message of my script>])
1210
+# ARG_OPTIONAL_SINGLE([option], o, [A option with short and long flags and default], [boo])
1311
+# ARG_OPTIONAL_BOOLEAN([print], , [A boolean option with long flag (and implicit default: off)])
1412
+# ARG_POSITIONAL_SINGLE([positional-arg], [Positional arg description], )
15-
+# ARG_DEFAULTS_POS
13+
# ARG_DEFAULTS_POS
14+
-# ARG_HELP([<The general help message of my script>])
1615
+# ARG_HELP([This is a minimal demo of Argbash potential])
1716
+# ARG_VERSION([echo $0 v0.1])
1817
+# ARGBASH_SET_INDENT([ ])
1918
# ARGBASH_GO
2019

2120
# [ <-- needed because of Argbash
2221

22+
# vvv PLACE YOUR CODE HERE vvv
23+
# For example:
2324
-printf 'Value of --%s: %s\n' 'option' "$_arg_option"
2425
-printf "'%s' is %s\\n" 'print' "$_arg_print"
2526
-printf "Value of '%s': %s\\n" 'positional-arg' "$_arg_positional_arg"
@@ -31,4 +32,5 @@
3132
+ echo "Not telling anything, print not requested"
3233
+fi
3334

34-
# ] <-- needed because of Argbash
35+
# ^^^ TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER ^^^
36+

doc/_static/wrapper-output-action.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Contents of '../src' matching '*.m4':
66
argbash-lib.m4: 0 kiB
77
argbash.m4: 10 kiB
88
argument_value_types.m4: 5 kiB
9-
collectors.m4: 20 kiB
9+
collectors.m4: 21 kiB
1010
constants.m4: 0 kiB
1111
default_settings.m4: 0 kiB
1212
docopt.m4: 3 kiB
@@ -23,7 +23,7 @@ Contents of '../src' matching '*.m4':
2323
output-strip-none.m4: 0 kiB
2424
output-strip-user-content.m4: 0 kiB
2525
progs.m4: 2 kiB
26-
stuff.m4: 46 kiB
26+
stuff.m4: 47 kiB
2727
utilities.m4: 11 kiB
2828
value_validators.m4: 5 kiB
2929
Contents of '../resources/examples' matching '*.m4':

doc/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If you want to use Argbash locally, you have to download the software package an
3535
* Supply ``INSTALL_COMPLETION=yes`` as an installation argument to install bash completion for ``argbash`` to ``$(SYSCONFDIR)/bash_completion.d``.
3636
The default ``SYSCONFDIR`` is ``/etc``, but you may override it in the same way as you can override the ``PREFIX`` variable.
3737

38-
* To be able to let Argbash :ref:`generate manpages <manpage_output>`, :ref:`rst2man <https://docutils.sourceforge.io/sandbox/manpage-writer/rst2man.txt>` needs to be installed on your system. It's part of the Python package :ref:`docutils <https://pypi.org/project/docutils/>` which can be installed on Debian/Ubuntu using ``sudo apt install python3-docutils``.
38+
* To be able to let Argbash :ref:`generate manpages <manpage_output>`, `rst2man <https://docutils.sourceforge.io/sandbox/manpage-writer/rst2man.txt>`_ needs to be installed on your system. It's part of the Python package `docutils <https://pypi.org/project/docutils/>`_ which can be installed on Debian/Ubuntu using ``sudo apt install python3-docutils``.
3939

4040
* Run some checks by executing: ``make check`` (still in the ``resources`` folder).
4141
You should get a message ``All is OK`` at the bottom.

resources/examples/minimal-raw.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# m4_ignore(
44
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
5-
exit 11 #)Created by argbash-init v2.8.1
5+
exit 11 #)Created by argbash-init v2.9.0
66
# ARG_OPTIONAL_SINGLE([option])
77
# ARG_OPTIONAL_BOOLEAN([print])
88
# ARG_POSITIONAL_SINGLE([positional-arg])
@@ -12,8 +12,12 @@ exit 11 #)Created by argbash-init v2.8.1
1212

1313
# [ <-- needed because of Argbash
1414

15+
# vvv PLACE YOUR CODE HERE vvv
16+
# For example:
1517
printf 'Value of --%s: %s\n' 'option' "$_arg_option"
1618
printf "'%s' is %s\\n" 'print' "$_arg_print"
1719
printf "Value of '%s': %s\\n" 'positional-arg' "$_arg_positional_arg"
1820

21+
# ^^^ TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER ^^^
22+
1923
# ] <-- needed because of Argbash

resources/examples/minimal.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# m4_ignore(
44
echo "This is just a script template, not the script (yet) - pass it to 'argbash' to fix this." >&2
5-
exit 11 #)Created by argbash-init v2.8.1
5+
exit 11 #)Created by argbash-init v2.9.0
66
# ARG_OPTIONAL_SINGLE([option], o, [A option with short and long flags and default], [boo])
77
# ARG_OPTIONAL_BOOLEAN([print], , [A boolean option with long flag (and implicit default: off)])
88
# ARG_POSITIONAL_SINGLE([positional-arg], [Positional arg description], )
@@ -14,6 +14,8 @@ exit 11 #)Created by argbash-init v2.8.1
1414

1515
# [ <-- needed because of Argbash
1616

17+
# vvv PLACE YOUR CODE HERE vvv
18+
# For example:
1719
if [ "$_arg_print" = on ]
1820
then
1921
echo "Positional arg value: '$_arg_positional_arg'"
@@ -22,4 +24,6 @@ else
2224
echo "Not telling anything, print not requested"
2325
fi
2426

27+
# ^^^ TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER ^^^
28+
2529
# ] <-- needed because of Argbash

0 commit comments

Comments
 (0)