Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: RC_EXPAND_PARAM final patch



> Totally agreed. If I get it right, the patch does following:
>   make substitutions (converting $^a into {a[1],a[2],...}
>   word-split the result (it can result in lists in {...} being extended
>     if SH_WORD_SPLIT is set)
>   make brace expansion in each word (with implicit word splitting)
> 
> Correct? Could anybody with better English ;) add description of how ZSH
> relly works to zshexpn(1)? 

*** Doc/Zsh/expn.yo~	Mon Jun  2 08:37:08 1997
--- Doc/Zsh/expn.yo	Mon Aug  4 17:59:38 1997
***************
*** 259,264 ****
--- 259,271 ----
  is set to tt(LPAR())var(a b c)tt(RPAR()), are substituted with
  `var(fooabar foobbar foocbar)' instead of the default
  `var(fooa b cbar)'.
+ 
+ In practice, each such expansion is converted into the
+ equivalent list for brace expansion, i.e. tt(${^)var(var)tt(}) becomes
+ tt({$var[1],$var[2],...}), and is processed as described in em(brace
+ expansion) below.  If word splitting is also in effect the
+ tt($var[)var(N)tt(]) may themselves be split into different list
+ elements.
  )
  item(tt(${=)var(spec)tt(}))(
  pindex(SH_WORD_SPLIT, use of)


-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, Platanenallee 6, 15738 Zeuthen, Germany.



Messages sorted by: Reverse Date, Date, Thread, Author