From: Ted Pavlic Date: Mon, 12 Jan 2009 21:11:32 GMT Subject: Re: [PATCH] Update bash completions to prevent unbound variable errors. Message-ID: <496BB204.2040109@tedpavlic.com> In-Reply-To: <200901121435.35547.bss@iguanasuicide.net> >> if [ -z "${1-}" ] > > That looks ugly to me. Any reason we shouldn't just "set +u" at the top of > the script? As already discussed, because the script must be sourced, then the "set +u" has global scope. I suppose that the option could be tested and then reset as appropriate at the end of the script. (note: for some reason Mercurial's bash completion script does not have this problem; they use $1 directly without bash complaining) -- Ted Pavlic Please visit my ALS association page: http://web.alsa.org/goto/tedpavlic My family appreciates your support in the fight to defeat ALS.