From: Jonathan Nieder Date: Fri, 23 May 2014 18:48:59 GMT Subject: Re: [PATCH v2] Get rid of the non portable shell export VAR=VALUE costruct Message-ID: <20140523184858.GF12314@google.com> In-Reply-To: Hi, Junio C Hamano wrote: > Junio C Hamano 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