Re: [PATCH 01/12] tests: add initial bash completion tests

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

 



On Sat, Apr 07, 2012 at 10:41:32PM -0700, Junio C Hamano wrote:

> > If bash is in posix mode (including "bash --posix" and being invoked as
> > "bin/sh"), it will set POSIXLY_CORRECT (but not export it). Similarly,
> > if POSIXLY_CORRECT is set in the outer environment, it will act more
> > like sh. So maybe that would be a better test.
> 
> Yes, but the check needs to be careful to make sure the shell that is
> running the check is indeed bash, so that it will explicitly exec bash for
> somebody who is running dash but exports POSIXLY_CORRECT to make GNU
> programs (other than bash) behave more standard compliant way.

Sorry, I thought that was obvious. Yes, this:

> In other words,
> 
> 	if test -n "$POSIXLY_CORRECT" && test -n "$BASH"
> 	then
>         	: we are running bash under posix mode
> 	elif ...
> 
> or somesuch.

is what I meant. Replace the "does it end in /bash" bit with
"POSIXLY_CORRECT" but, keep the $BASH check.

-Peff
--
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]