Probably because 'echo' is also a binary at /bin/echo. Try that with

functions foo
    echo $argv
end

and use 'foo' instead of 'echo' and it won't work.

-Kevin

On Jul 24, 2012, at 5:46 AM, Peter Flood <i...@whywouldwe.com> wrote:

> Maybe you need to pass parameters specifically, this works for me and is 
> not fish specific, also works in bash
> 
>     ls -1 | xargs -I varname echo varname
> 
> 
> 
> 
> On 24/07/2012 13:44, Eloy Durán wrote:
>> Sorry for not being clear enough, in this example `clean_file` is my 
>> function.
>> 
>> On Jul 24, 2012, at 2:42 PM, "Maxim Gonchar" <gma...@gmail.com> wrote:
>> 
>>> Hi,
>>> 
>>> the clean_file executable is not found.
>>> What is clean_file? Does `which clean_file` prints something?
>>> As for the syntax, I guess you can use the following instead:
>>> 
>>> clean_file (find Classes -name '*.m' -print0)
>>> 
>>> regards,
>>> Maxim
>>> 
>>> On Tue, 24 Jul 2012 21:38:35 +0900, Eloy Durán <eloy.de.en...@gmail.com> 
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I have a function that operates on one file. Now I have a list of files, 
>>>> for instance from `find`, which I would all like to pass to this function 
>>>> one by one. In my naive attempt I did the following:
>>>> 
>>>>  find Classes -name '*.m' -print0 | xargs -0 clean_file
>>>> 
>>>> For which I get the error: “clean_file: No such file or directory”. (Same 
>>>> goes for using `find -exec`.)
>>>> 
>>>> I’m sure I’m using incorrect syntax, I’ve also tried adding parentheses 
>>>> around the function name, but I’m just trying things by now. Can someone 
>>>> show the way?
>>>> 
>>>> Cheers,
>>>> Eloy
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>> will include endpoint security, mobile security and the latest in malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> Fish-users mailing list
>>>> Fish-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/fish-users
>> 
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Fish-users mailing list
>> Fish-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fish-users
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to