for loop with variable

Ray Andrews <[email protected]> Mon, 11 May 2026 09:44:56 -0700
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------YoOKAWFqKuAXvCmR06KZtZVH
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

% var=" a b c "

% for aa in $=var; do echo $aa; done
a
b
c

% for aa in [a-c]; do echo $aa; done
c

... In the last 'for' it wants to find files whereas in the previous it 
knows it's looking at text.  Could the previous be done on one line?  
That is, the range '[a-c]' would be understood to be just text, not a 
file glob?
--------------YoOKAWFqKuAXvCmR06KZtZVH
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="DejaVu Sans">% var=" a b c "<br>
      <br>
      % for aa in $=var; do echo $aa; done<br>
      a<br>
      b<br>
      c<br>
      <br>
      % for aa in [a-c]; do echo $aa; done <br>
      c<br>
      <br>
      ... In the last 'for' it wants to find files whereas in the
      previous it knows it's looking at text.  Could the previous be
      done on one line?  That is, the range '[a-c]' would be understood
      to be just text, not a file glob?  </font>
  </body>
</html>

--------------YoOKAWFqKuAXvCmR06KZtZVH--