From: Jeff King Date: Wed, 17 Jun 2015 22:13:31 GMT Subject: Re: [PATCH v2 2/2] test-lib.sh: fix color support when tput needs ~/.terminfo Message-ID: <20150617221331.GA26069@peff.net> In-Reply-To: <1434575481-24604-3-git-send-email-rhansen@bbn.com> On Wed, Jun 17, 2015 at 05:11:21PM -0400, Richard Hansen wrote: > + test -z "$1" && test -n "$quiet" && return > + eval "say_color_color=\$say_color_$1" Thanks, this looks much simpler. In the non-quiet case, you will eval $say_color_, even though we know it to be bogus. I guess we need to make sure say_color_color is blank, though. The alternative would be: if test -z "$1"; then test -n "$quiet" && return say_color_color= else eval "say_color_color=\$say_color_$1" fi I dunno if that makes the intent more clear or not. I am OK with it either way. -Peff