On Fri, Jun 6, 2008 at 12:50 AM, Martin Bähr
<[EMAIL PROTECTED]> wrote:
> On Thu, Jun 05, 2008 at 05:54:05PM -0400, Philip Ganchev wrote:
>> On 6/2/08, Piotr Husiatyński <[EMAIL PROTECTED]> wrote:
>> >     var=$(dmenu_path | dmenu); exec $var
>> function temp_func; dmenu_path | dmenu; end
>> temp_func
>> functions -e temp_func
>
> that function will run dmenu_path | dmenu every time, but in the above
> case $var can be reused multiple dtimes while dmenu_path | dmenu is only
> run once.

True.  Since "var" is not local, the equivalent in fish is just
omitting the last line ("functions -e temp_func").  I agree, though,
that it may be useful to be able to declare functions as local.

> in this example it may not matter, but in other cases it can make a
> difference if running the command has sideeffects or changes the result.

Not sure what you mean.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to