"G. Branden Robinson" <[email protected]> writes:

> At 2025-11-18T14:19:50-0800, Collin Funk wrote:
>> Isn't this way of comparing, e.g.
>> 
>>    if "x$var" = x; then
>
> (You need "test" or "[" and "]" here.)

That is embarrassing. I was focusing all my energy into not typing "==".
:)

> Perhaps it is impossible to avoid if "test"/"[" is not a shell builtin?
> Do any shells of that description still live?

Not that I am aware of.

>> I think we assume a reasonable shell for
>> ./configure.
>
> I sure hope so.  The old "x$var" idiom is hideously ugly and
> off-puttingly confusing to newcomers.

We do, see examples like:

    if test $gl_gcc_warnings != no; then
      : # Snipped code.
    fi

Collin

Reply via email to