zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Hahler <genml+zsh-workers@thequod.de>
To: zsh-workers@zsh.org
Subject: [PATCH] [RFC] _make: complete _files
Date: Thu, 25 Jan 2018 22:40:11 +0100	[thread overview]
Message-ID: <20180125214011.30315-1-genml+zsh-workers@thequod.de> (raw)

From: Daniel Hahler <git@thequod.de>

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


                 reply	other threads:[~2018-01-25 21:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180125214011.30315-1-genml+zsh-workers@thequod.de \
    --to=genml+zsh-workers@thequod.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).