On Mon, Feb 21, 2011 at 18:53, Beni Cherniavsky-Paskin <[email protected]>wrote:
> I dimly recall Axel explaining that commands are expanded in a separate
> pass so they won't have to be run many times (because commands can be
> expensive and/or have side effects).
>
Ah, that makes sense (somewhat). Expansion creates the carthesian product of
the lists in the variables/commands:
> set foo first second
> set bar alpha beta
> echo $foo-$bar
first-alpha second-alpha first-beta second-beta
A naive implementation would need to run expensivecommand in "echo
$foo-(expensivecommand)" multiple times. But it wouldn't be too hard to
evaluate the variables/commands in order and only combine them once the
results of all commands/variables was known. Guess fish doesn't do that.
(didn't check the source)
Jan
------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
Collect, index and harness all the fast moving IT data generated by your
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights.
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users