Note: it’s `type —-quiet command`. The option parser stops parsing options 
after it finds the first non-option argument.

-Kevin

On Sep 7, 2014, at 3:54 PM, ridiculous_fish <corydo...@ridiculousfish.com> 
wrote:

> Hi Roman,
> 
> The type command is the preferred way to do this. I don't think your example 
> is ugly (maybe I have lower standards though!)
> 
> Note that in top of tree, type has a --quiet option, so you will be able to 
> write `type command --quiet`
> 
> Hope that helps,
> _fish
> 
> On Sep 6, 2014, at 1:21 AM, Roman Inflianskas <infr...@gmail.com> wrote:
> 
>> I want to execute a command but I'm not sure that it exists. I know how to 
>> check function existence. But how can I check command existence? I didn't 
>> find an option for `test` to do this. The only way I found is:
>> 
>> type COMMAND >/dev/null; and COMMAND $argv
>> 
>> But it's kind of ugly.
>> 
>> -- 
>> Regards, Roman Inflianskas
> 
> 
> ------------------------------------------------------------------------------
> Slashdot TV.  
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to