Turns out that
bind -m yourmode
lists all the entries for that mode, and returns successfully even if there is
no binding for that mode.
So I did
if bind -M insert > /dev/null 2>&1
...
end
> On 28 Apr 2015, at 17:33, Greg Reagle <[email protected]> wrote:
>
> On Sat, Apr 25, 2015, at 06:21 AM, Oliver Schrenk wrote:
>> what is the best way to test if a command or rather a specific command
>> option exists?
>>
>> Specifically I want to test if `bind -M` is supported by the current
>> version of the shell.
>
> A suggestion:
> Test the version of fish (fish -v). Determine what versions of fish do
> or do not support "bind -M".
>
> --
> http://www.fastmail.com - The way an email service should be
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Fish-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fish-users
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users