Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.0.8 available (preliminary announcement)



On Tue, 2 Jun 2015 12:06:20 +0200
Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> Is the -o option to test safe to use in configure? It seems existing
> tests use || and && but the precedence of those wouldn't be right.

I think the definitive answer is "probably, who knows?"  configure has
been written to handle some very ancient implementations of test, but
the things it's more likely to fall down on are what happens with
confusing arguments (as zsh still sometimes does or did), which doesn't
apply here.  You might find better guidance in the autoconf
documentation if there's none in the existing code.

The ultra paranoid way to do it is nest the ifs...

if  test1 || test2; then
  if test3 && test4 && test5 ..; then
    stuff
    done_some_stuff=yes
  fi
fi
if test x$done_some_stuff != xyes; then
  alternative stuff
fi

I committed Baptiste's patch, it looks like you might want to back it
off.

pws



Messages sorted by: Reverse Date, Date, Thread, Author