git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 23, 2014, 18:48 UTC
Message-ID
<20140523184858.GF12314@google.com>
In-Reply-To
<xmqqegzkjq5e.fsf@gitster.dls.corp.google.com>
Hi,
Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> 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

Previous: Junio C HamanoNext: Jonathan Nieder
Message 5 of 10 in “Get rid of the non portable shell export VAR=VALUE costruct”
  1. Get rid of the non portable shell export VAR=VALUE costructElia Pinto, May 23, 2014
  2. Jonathan NiederMay 23, 2014
  3. Junio C HamanoMay 23, 2014
  4. Junio C HamanoMay 23, 2014
  5. Jonathan NiederMay 23, 2014
  6. Jonathan NiederMay 23, 2014
  7. Torsten BögershausenMay 23, 2014
  8. Junio C HamanoMay 23, 2014
  9. Junio C HamanoMay 23, 2014
  10. Eric SunshineMay 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.