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

Re: buggy configure completion - when both --enable-foo and --disable-foo are listed



On 2016-08-31 03:00:55 +0000, Daniel Shahaf wrote:
> Vincent Lefevre wrote on Wed, Aug 31, 2016 at 01:23:32 +0200:
> > With zsh 5.2, I get the following, which doesn't make sense:
> > 
> > zira:~/software/mpfr> ./configure --enable-decimal-float[Tab]
> > Completing option
> > --enable-decimal-float  -- build conversion functions from/to decimal floats
> > --enable-decimal-float  -- explicitly disable decimal floats support
> > 
> > One has from the "configure --help" output:
> > 
> >   --disable-decimal-float explicitly disable decimal floats support
> >   --enable-decimal-float  build conversion functions from/to decimal floats
> >                           [default=autodetect]
> 
> What do you expect to see?  How should the two strings ("build .." and
> "explicitly ...") be handled?
> 
> Minimal example:
> 
> % print -rl -- '#!/bin/sh' 'cat <<"EOF"' '  --enable-foo  enable foo' '  --disable-foo  disable foo' 'EOF' >configure
> % chmod +x configure
> % ./configure --<TAB>
> --disable-foo  --enable-foo  -- enable foo                                    
> --disable-foo  --enable-foo  -- disable foo                                   

The problem is that it says "build conversion functions from/to
decimal floats" after --enable-decimal-float while it corresponds
to --disable-decimal-float. So, I'd say, either

--enable-decimal-float  -- build conversion functions from/to decimal floats
--disable-decimal-float -- explicitly disable decimal floats support

(thus skipping the --disable-decimal-float when one completes on
--enable[Tab]), or add "=no" for the disable cases, e.g.:

--enable-decimal-float    -- build conversion functions from/to decimal floats
--enable-decimal-float=no -- explicitly disable decimal floats support

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



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