Re: [PATCH 2/2] test-lint: detect 'export FOO=bar'

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 2/2] test-lint: detect 'export FOO=bar'

From: Thomas Rast <hidden>
Date: 2016-06-15 22:58:03

Torsten Bögershausen [off-list ref] writes:
quoted
+	/^\s*export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';
I have a slightly tighter reg exp in my tree, but credits should go to Thomas: 

/^\s*export\s+\S+=\S+/
Hmm, is that correct?  I would expect shells that have problems with
'export FOO=bar' to also fail on 'export FOO=' (i.e. set to empty string
and export).

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Re: [PATCH 2/2] test-lint: detect 'export FOO=bar'

From: Torsten Bögershausen <hidden>
Date: 2016-06-15 22:58:03

On 09.07.13 11:28, Thomas Rast wrote:
Torsten Bögershausen [off-list ref] writes:
quoted
quoted
+	/^\s*export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';
I have a slightly tighter reg exp in my tree, but credits should go to Thomas: 

/^\s*export\s+\S+=\S+/
Hmm, is that correct?  I would expect shells that have problems with
'export FOO=bar' to also fail on 'export FOO=' (i.e. set to empty string
and export).
Good point, thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help