about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2018-01-25 22:38:20 +0100
committerDaniel Hahler <git@thequod.de>2018-02-11 20:09:30 +0100
commitc18fe510f4321210ddb450cdfa08fbf2bae8a580 (patch)
treed5af08089014757834a4b1fc82fdea480a918255
parent567733906210feaebce94675985eb1e77602bfd8 (diff)
downloadzsh-c18fe510f4321210ddb450cdfa08fbf2bae8a580.tar.gz
zsh-c18fe510f4321210ddb450cdfa08fbf2bae8a580.tar.xz
zsh-c18fe510f4321210ddb450cdfa08fbf2bae8a580.zip
42327: _make: complete _files
The use case is completing files that are actual targets, generated
using $(wildcard …).

Q: Could this be made to only complete files if make targets and vars
are empty?
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Command/_make3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 741fcad60..59430a64d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-02-11  Daniel Hahler  <zsh@thequod.de>
+
+	* 42327: Completion/Unix/Command/_make: _make: complete _files.
+
 2018-02-08  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* unposted: Completion/Unix/Command/_subversion: Support
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