I've been looking for a way to do this for a while, there are several
StackOverflow questions on the topic but so far I have not found a way to
do this.
I've written a very primitive fish function to do it *sometimes* ;)
function opt
> echo $argv | read -l command option
> man $command | grep -n -F -e $option | read -l first rest
> set number (echo $first | grep -o -E '[0-9]*')
> man $command | sed -n $number,(math $number + 20)p
> end
Anyway, very interested if anyone knows a decent way to do this.
Best,
Jon
On Sat, Apr 25, 2015 at 5:21 AM, Oliver Schrenk <oliver.schr...@gmail.com>
wrote:
> Hi,
>
> 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.
>
> Cheers,
> Oliver
>
> ------------------------------------------------------------------------------
> 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
> Fish-users@lists.sourceforge.net
> 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
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users