Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug in completion for make
- X-seq: zsh-workers 31839
- From: luc <luc.lists@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Bug in completion for make
- Date: Fri, 18 Oct 2013 16:40:22 +0200
- 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==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author