Subject: Re: [PATCH v2] Get rid of the non portable shell export VAR=VALUE costruct

From: Jonathan Nieder <[email-masked]>
Date: Fri, 23 May 2014 11:48:59 -0700

Hi,

Junio C Hamano wrote:
> Junio C Hamano <[email-masked]> writes:

>> Makes me wonder why these two were missed, though.
>
> Perhaps something like this?
[...]
> -	/^\s*export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';
> +	/(?:^|[^-a-zA-Z0-9_])export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';

Messages crossed.

I think I like "\b" better for this, while I also share your lack of
enthusiasm for parsing shell with something that is not a shell.

Maybe it's worth filing bugs against "posh -n" to make it
(optionally?) notice things we want to detect with a goal of
eventually moving to that.

Thanks,
Jonathan