From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: following -C option in make completion
Date: Sun, 22 Dec 2019 04:31:31 +0000 [thread overview]
Message-ID: <20191222043131.sosy5gg5aevuu765@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <2024-1573077069.922525@CD2K.zG8N.q383>
Good morning Oliver,
Oliver Kiddle wrote on Wed, Nov 06, 2019 at 22:51:09 +0100:
> In the make completion, there's some very old logic for picking out the
> argument to -C. _arguments makes this rather easier if we just look in
> $opt_args and has the advantage that we can handle -Cdir and --directory
> forms (not just -C dir).
>
> This patch also uses the computed $basedir value for our view of the GNU
> make $(CURDIR) macro so it will handle include files referenced relative
> to $(CURDIR).
>
> Previously $basedir was forced into absolute form which I don't think
> gains us anything - _files -W doesn't care. Neither does finding files
> to include. But perhaps this breaks things for some form or another.
>
> I'm also not sure what the (q) modifier achieved. I've used
> ${(Q)~opt_args... so it'll expand usernames and remove a level of
> quoting. opt_args also does some extra quoting for colons which could
> also be removed. We could do with some sort of safe-eval for where
> completion functions make use of bits of the command line - expanding
> variables and named directories is useful but command-substitutions not
> so.
I've ran into a regression, and reverting this patch fixes it.
Using current master, and the following setup:
% cd "$(mktemp -d)"
% mkdir foo
The following two work:
% make -C <TAB>
[offers foo]
% make -C ./fo<TAB>
[expands to ./foo]
But the following does not:
% make -C fo<TAB>
[no matches]
It does work if I revert this patch.
WDYT?
Cheers,
Daniel
next prev parent reply other threads:[~2019-12-22 4:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2024-1573077069.922525.ref@CD2K.zG8N.q383>
2019-11-06 21:51 ` Oliver Kiddle
2019-12-22 4:31 ` Daniel Shahaf [this message]
2020-01-02 18:00 ` Oliver Kiddle
2020-01-03 19:51 ` Daniel Shahaf
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=20191222043131.sosy5gg5aevuu765@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=okiddle@yahoo.co.uk \
--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).