Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] [RFC] _make: complete _files
- X-seq: zsh-workers 42327
- From: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] [RFC] _make: complete _files
- Date: Thu, 25 Jan 2018 22:40:11 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= content-transfer-encoding:content-type:content-type:mime-version :x-mailer:message-id:date:date:subject:subject:from:from :received:received:received; s=postfix2; t=1516916413; bh=Wvnf8E O5hZqsdgNr9firujUN69COKcF36fJk0W+EQKU=; b=DeapO5wjB8bTFYeyDXgbEa gkz2lScLWvj4v1t+haK6xX7CVwlr4uDNeHN9qJ+VPMJ9VXc7/YjmAJPVgjOTSrfU 4LaFAB9TSBJCq3cAjmQYmDuKw0LnCID0F8kOJyRy8IioO1CPA6KGyNTTEr+1lC8z Ynz7U6/RvVGs8xZDLaqG4=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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