Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

How to add completion: variant of "make" command



I would like to configure zsh to support completion of make targets,
in the following setup.  I have no idea how to go about this: Where to
start reading docs, for instance.

* Our Makefiles depend on the environment because they contain
  "include $(FOO)" where FOO comes from the environment.

* I have a shell script, say "xmake", that

  - searches for a project root directory amongst the ancestors of the
    current directory, then
  - changes into that directory (if found),
  - then sources a file ENV from that directory (if it exists), and
    finally
  - invokes regular "make".

  (The shell script also prints GNU-style "Entering directory `foo'"
  and "Leaving directory `foo'" messages to enable Emacs to parse the
  error messages.)

So how do I make a variant of "make" completion that does what the
shell script does before it invokes regular "make" completion?

Thanks,
Kai




Messages sorted by: Reverse Date, Date, Thread, Author