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

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

 



* Boyd Stephen Smith Jr. [Mon, 12 Jan 2009 14:35:35 -0600]:

> >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?

`set +u` affects the shell globally, not just to the sourced file. If
you do that, you must be aware that you'll be preventing people from
running their shell in `set -u` mode. (Merely stating a fact here, not
giving any opinion.)

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
The problem I have with making an intelligent statement is that some
people then think that it's not an isolated occurrance.
                -- Simon Travaglia

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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