From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22097 invoked by alias); 18 Oct 2013 14:55:45 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31839 Received: (qmail 6946 invoked from network); 18 Oct 2013 14:55:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=M9Jy+2z2V+UKCW2KtC34TWQQj20Qz/dfek6RlsXRttU=; b=c/lhgH29Eyf/GHjkVso4MVMAdF5ge4YUsLa9tEXguxrM9MeNO7BQpi9WrzfYB2WvZA HNJcanx2d37kvVEBZBhTxypcll02xmStBAMxN2eC1sp43vq+gVTLZlt/C+W/Anqoos/p bBwBPMEmg6jSi9mp33ggjtDhHXzNVfASVSYLwZVis8+TlQiuIEUGepjaYSl+dr7J7GtF sKYrPbl0RiZ4QWArhF+4x2xeERyqpny9L6MAoz6QtNmMnRhrFTSNMuIsjcoDo9ogKebl PzhlH5E2Xa4ovrIB8e0yq9y8bVbLPQDuOw7aIXO+PHDakjkGLaWG6+8pz7GM5WuRcdv9 Rb+g== X-Received: by 10.15.98.9 with SMTP id bi9mr3760820eeb.67.1382107225829; Fri, 18 Oct 2013 07:40:25 -0700 (PDT) Date: Fri, 18 Oct 2013 16:40:22 +0200 From: luc To: zsh-workers@zsh.org Subject: Bug in completion for make Message-ID: <20131018144022.GA61854@mbp.Speedport_W_700V> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="wac7ysb48OaltWcw" Content-Disposition: inline X-PGP-Key: http://luc42.lima-city.de/files/public.asc User-Agent: Mutt/1.5.21 (2010-09-15) --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello list members, I'm using zsh 5.0.2 on Mac OSX 10.6 compiled via homebrew. When I complete targets for one of my makefiles I get some extra suggestions, which I should not get. I have attached a example makefile to reproduce the issue. To reproduce the issue copy the attached makefile to a (new) directory of your choice and run "make prepare". Then enter "make " and press CTRL-D. On my system the suggestions are: 1.pdf 2.pdf 3.pdf \'s\#src/\(.\*\).tex\#1.pdf \| clean files.mk ls main prepare sed src/\*.tex but I expect them to be: 1.pdf 2.pdf 3.pdf clean files.mk main prepare I looked at the code of _make and it seems that the error arises when the makefile is parsed by _make-parseMakefile. The line five of my example file is misinterpreted because it contains a colon. _make-parseMakefile therefor thinks it is a line containing a target and a dependency. The pattern used in _make-parseMakefile (in case ... esac) is ([[:alnum:]][^$TAB:=]#:[^=]*) . I do not understand why this matches a line starting with a TAB-character. Sadly I also do not know how to correct this line. Do you think this can be fixed? Best regards Luc --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=makefile include files.mk main: @echo Compiling main ... files.mk: $(shell ls -t src/*.tex | head -n 1) ls src/*.tex | sed 's#src/\(.*\)\.tex#\1.pdf:#' > files.mk %.pdf: src/%.tex @echo pdflatex ... clean: rm -f files.mk *.pdf prepare: mkdir -p src touch src/1.tex src/2.tex src/3.tex $(MAKE) files.mk --wac7ysb48OaltWcw--