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

Re: Bug#455070: zsh: make completion: please add support for -include



On Sat, Dec 08, 2007 at 08:58:17PM +0100, Vincent Lefevre wrote:
> As shown below, "make" completion supports "include",
> but not "-include".
> 
> vin:~> head -99 Makefile*
> ==> Makefile <==
> test.b: test.a
>         touch $@
> 
> include Makefile-2
> 
> -include Makefile-3
> 
> ==> Makefile-2 <==
> test.c: test.b
>         touch $@
> 
> ==> Makefile-3 <==
> test.d: test.c
>         touch $@
> vin:~> make [TAB]
> Completing make target
> test.b  test.c

Could you give this completely-untested patch a try?

Index: Completion/Unix/Command/_make
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_make,v
retrieving revision 1.19
diff -u -r1.19 _make
--- Completion/Unix/Command/_make	10 Nov 2006 09:59:27 -0000	1.19
+++ Completion/Unix/Command/_make	8 Dec 2007 21:06:29 -0000
@@ -125,7 +125,7 @@
 _pick_variant -r is_gnu gnu=GNU unix -v -f
 
 if [[ $is_gnu = gnu ]]; then
-    incl=include
+    incl="(-|)include"
 else
     incl=.include
 fi



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