zsh-users
 help / color / mirror / code / Atom feed
* Makefile completion with wildcard targets
@ 2015-07-27 16:47 Andri Möll
  2015-07-27 18:13 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Andri Möll @ 2015-07-27 16:47 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

Hey,

I’ve got a few GNU Makefiles that contain targets in the form of “test/*_test.js”. Autocomplete however doesn’t considers them to be filenames and completes them to a literal "test/\*_test.js”. A little annoying. Does anyone have a off the head idea how to fix that in /usr/share/zsh/functions/_make? I’m on Zsh v5.0.8 here.

Thanks in advance!

Andri

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Makefile completion with wildcard targets
  2015-07-27 16:47 Makefile completion with wildcard targets Andri Möll
@ 2015-07-27 18:13 ` Bart Schaefer
  2015-07-28 13:11   ` Jun T.
  2015-09-30  9:23   ` Andri Möll
  0 siblings, 2 replies; 4+ messages in thread
From: Bart Schaefer @ 2015-07-27 18:13 UTC (permalink / raw)
  To: zsh-users

You could try changing (near the end of _make):

        _requested targets expl 'make targets' \
          compadd -- ${(k)TARGETS} && ret=0

to

        _requested targets expl 'make targets' \
          compadd -Q -- ${(k)TARGETS} && ret=0

Thereafter the _expand completer should be able to resolve them into
file names.

Any zsh-workers have an opinion on whether this would be correct for all
targets?  Should we just make this change in the distribution?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Makefile completion with wildcard targets
  2015-07-27 18:13 ` Bart Schaefer
@ 2015-07-28 13:11   ` Jun T.
  2015-09-30  9:23   ` Andri Möll
  1 sibling, 0 replies; 4+ messages in thread
From: Jun T. @ 2015-07-28 13:11 UTC (permalink / raw)
  To: zsh-users


On 2015/07/28, at 3:13, Bart Schaefer <schaefer@brasslantern.com> wrote:

> Should we just make this change in the distribution?

Probably, because if the target has meta-characters like # or ^
then we can use
% make '<TAB>

But while I was testing I found another (independent) problem:
the function _make-expandVars() is not working at all.

I'll continue this subject on the zsh-workers list.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Makefile completion with wildcard targets
  2015-07-27 18:13 ` Bart Schaefer
  2015-07-28 13:11   ` Jun T.
@ 2015-09-30  9:23   ` Andri Möll
  1 sibling, 0 replies; 4+ messages in thread
From: Andri Möll @ 2015-09-30  9:23 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

Finally got around to giving it a spin and it seems to work. Thank you!

A.


Bart Schaefer wrote:
> You could try changing (near the end of _make):
>
>          _requested targets expl 'make targets' \
>            compadd -- ${(k)TARGETS}&&  ret=0
>
> to
>
>          _requested targets expl 'make targets' \
>            compadd -Q -- ${(k)TARGETS}&&  ret=0
>
> Thereafter the _expand completer should be able to resolve them into
> file names.
>
> Any zsh-workers have an opinion on whether this would be correct for all
> targets?  Should we just make this change in the distribution?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-30  9:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27 16:47 Makefile completion with wildcard targets Andri Möll
2015-07-27 18:13 ` Bart Schaefer
2015-07-28 13:11   ` Jun T.
2015-09-30  9:23   ` Andri Möll

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).