Re: [PATCH] Update bash completions to prevent unbound variable errors.
- From
Boyd Stephen Smith Jr. <bss@iguanasuicide.net>
- Date
- Jan 12, 2009, 20:35 UTC
- Message-ID
- <200901121435.35547.bss@iguanasuicide.net>
- In-Reply-To
- <496BA0E4.2040607@tedpavlic.com>
On Monday 2009 January 12 13:58:28 you wrote:
Show 11 quoted lines
>In bash, "set -u" gives an error when a variable is unbound. In this
>case, the bash completion script included in the git/contrib directory
>produces several errors.
>
>The attached patch replaces things like
>
> if [ -z "$1" ]
>
>with
>
> if [ -z "${1-}" ]That looks ugly to me. Any reason we shouldn't just "set +u" at the top of the script?
-- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/