On Mon, Feb 21, 2011 at 6:35 PM, Jan Kanis <[email protected]> wrote: > Hmm, it appears fish indeed does some tricky things with expansion. Separate > arguments are expanded left to right: >
Interesting, the user doc said "from right to left". >> set foo first >> echo $foo (set foo second) $foo (set foo third) $foo > first second third >> According to user doc, (command substitution first, right to left), fish should have expanded it as: echo $foo (set foo second) $foo $foo # now foo=third echo $foo $foo $foo # now foo=second echo second second second > But within one argument the command substitution is done first: >> set foo first >> echo $foo-(set foo second; echo)-$foo-(set foo third; echo)-$foo > third--third--third >> This follows user doc, though. (I guess by saying right to left, it means right arguments to left arguments.) echo $foo-second-$foo-(set foo third; echo)-$foo # now foo=second echo $foo-$foo--$foo # now foo=third third--third--third ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
