From: Junio C Hamano Date: Wed, 02 Jan 2019 16:46:46 GMT Subject: Re: [PATCH] test-lib: check Bash version for '-x' without using shell arrays Message-ID: In-Reply-To: Johannes Sixt writes: > Would it perhaps be simpler to just hide the syntax behind eval? Like > > if test -z "$test_untraceable" || { > test -n "$BASH_VERSION" && eval ' > test ${BASH_VERSINFO[0]} -gt 4 || { > test ${BASH_VERSINFO[0]} -eq 4 && > test ${BASH_VERSINFO[1]} -ge 1 > } > ' It indeed is somewhat easier to see that your version does exactly the same as the original than the posted patch, but the pattern substitutions are not all that bad, either.