Re: [PATCH] Update bash completions to prevent unbound variable errors.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 2009 January 12 13:58:28 you wrote:
>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@xxxxxxxxxxxxxxxxx                     ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.net/                      \_/     

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux