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

Re: `make' completion in zsh-3.1.9

Bart Schaefer wrote:
> On Mar 18,  2:13am, Andrew Morton wrote:
> } Subject: `make' completion in zsh-3.1.9
> }
> } /usr/src/linux> make menu<tab>
> }
> } the shell locks up for about ten seconds, recurring into every
> } directory of the kernel tree doing *something*.  Finally,
> } it comes back with `make menuconfig'.
> It's running "make -nsp --no-print-directory -f Makefile .PHONY" to cause
> make itself to output the list of possible completions.  I don't know why
> this would be taking 10 seconds or more -- it finishes in 1 second or so
> on my machine.

Oh I see.  `make -nsp' takes a very long time to complete in the top level of
the kernel tree.  It produces 34 megabytes of output.

zsh-3.1.6 does this:

	awk /^[a-zA-Z0-9][^\/ \t]+:/ {print $1}

to find potential targets in the makefile, whereas 3.1.9 does this:

    if [[ -n "$_is_gnu[$words[1]]" ]]; then
      	< make -n stuff >
        <awk '/^[a-zA-Z0-9][^\/\t=]+:/ stuff>

And the 3.1.9 behaviour actually doesn't work properly - it
matches things which can't possibly be built from this directory
such as floppy.c

Ho hum.  I'll just edit /usr/share/zsh/3.1.9/functions/User/_make
and put it back the old way.


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