title: Set environment variable for subshell invocation
body: <p>I want to extend the concept to be able to set an environment variable just for the invocation of one subprocess, i.e.</p>
  
  <pre><code>VARIABLE=VALUE COMMAND PARAMETERS
  </code></pre>
  
  <p>for instance</p>
  
  <pre><code>FOO=6 printenv FOO
  </code></pre>
  
  <p>to the case, where COMMAND is a subshell. As an example to demonstrate this problem, I used</p>
  
  <pre><code> FOO=6 BAR=7 ( printenv FOO; printenv BAR )
  </code></pre>
  
  <p>which resulted in a </p>
  
  <pre><code>zsh: parse error near `('
  </code></pre>
  
  <p>Why is it that this does not work, although </p>
  
  <pre><code> export FOO=6
   export BAR=7
   ( printenv FOO; printenv BAR )
  </code></pre>
  
  <p>does work. Of course I could do a</p>
  
  <pre><code># Explicit call of zsh needed:
  FOO=6 BAR=7 zsh -c 'printenv FOO; printenv BAR'
  </code></pre>
  
  <p>or a</p>
  
  <pre><code># Two nested subshells, instead of one, and a lot more to type:
   (export FOO=6; export BAR=7; (printenv FOO; printenv BAR))
  </code></pre>
  
  <p>but is there also a simple way using notation with parenthesis for the subshell?</p>
  
  <p>I somehow feel that I'm lacking something fundamental in making subshells using <code>(....)</code></p>