]> git.tuebingen.mpg.de Git - gsu.git/commit
_gsu_print_available_commands(): Don't abort if set -e is set.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 3 Mar 2015 17:15:52 +0000 (18:15 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 3 Mar 2015 17:15:52 +0000 (18:15 +0100)
commitee0253579a48cddcf022a7978afe68bc57311313
tree56b39a2bcfb3e78487ed25c6386b3e3355ae9a0d
parent5829a1d41d45ea6a8ce04292c8f4c9487a4414a4
_gsu_print_available_commands(): Don't abort if set -e is set.

It was pointed out by Congmao Wang that the example hello.bash script
prints only the first subcommand and exits if it is called with an
invalid subcommand and set -e is set. This is due to the "let count++"
statement which returns 1 in the first iteration of the loop since
count is zero.

This patch changes the statement to "let ++count" which returns zero
in all cases.
subcommand