Re: [PATCH] git-parse-remote: fix ambiguous shell bug in expand_refs_wildcard

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

 



On Mon, May 07, 2007 at 02:36:22AM -0400, Jeff King wrote:
>
> It looks like bash is actually broken in POSIXLY_CORRECT mode, then:
> 
> $ echo $BASH_VERSION
> 3.1.17(1)-release
> $ POSIXLY_CORRECT=1
> $ foo=bar}
> $ echo "${foo%'}'}"
> bar
> 
> My interpretation of the correct behavior is that it should remove a
> single quote from the end of foo, and then print '} literally (that is,
> single quote and brace).

Well strictly speaking this is allowed by the standard as this usage
contains an odd number of single quotes inside an ${...} expression
enclosed by double quotes, which behaves in an implementation-specific
manner.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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]