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

[PATCH] [RFC] _make: complete _files



From: Daniel Hahler <git@xxxxxxxxxx>

The use case is completing files that are actual targets, generated
using $(wildcard …).

Q: Can this be made to only complete files if make targets and vars
are empty?  Does it make sense, or is it good as-is?
---
 Completion/Unix/Command/_make | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index 890ad1c83..1da865ed0 100644
--- a/Completion/Unix/Command/_make
+++ b/Completion/Unix/Command/_make
@@ -289,7 +289,8 @@ _make() {
     else
       _alternative \
         'targets:make target:compadd -Q -a TARGETS' \
-        'variables:make variable:compadd -S = -F keys -k VARIABLES' && ret=0
+        'variables:make variable:compadd -S = -F keys -k VARIABLES' \
+        '*:file:_files' && ret=0
     fi
   esac
 
-- 
2.16.1



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