[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking whether program foo supports option --bar

From: Sébastien Hinderer
Subject: Re: Checking whether program foo supports option --bar
Date: Thu, 10 Mar 2022 15:30:37 +0100


Peter Johansson (2022/03/02 09:13 +1000):
> Hi Sebasien,
> On 2/3/22 04:23, Paul Eggert wrote:
> > On 3/1/22 09:08, Sébastien Hinderer wrote:
> > > Is there a conventional / recommended way to test whether a program
> > > supports a given command-line option?
> >
> > You can use either AS_IF or plain sh 'if', depending on how complicated
> > the then- and else- parts are.
> >
> You might find the macro YAT_RUN_LOG useful, which is a wrapper around AS_IF
> with some extra stuff like redirecting stderr to the log etc.

It turned out the implementation was simpler than I thought! It does not
happen that often.

But many thanks for the reposnse and link!

Best wishes,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]