]> git.notmuchmail.org Git - notmuch/commitdiff
Install zsh completion file
authormartin f. krafft <madduck@debian.org>
Fri, 8 Jan 2010 22:49:34 +0000 (11:49 +1300)
committermartin f. krafft <madduck@debian.org>
Thu, 14 Jan 2010 05:12:13 +0000 (18:12 +1300)
According to the Debian zsh maintainer Clint Adams, this is the first
time that a package installs its own completer into zsh. Part of the
reason this is not usually done is because zsh does not provide a stable
API.

We agreed to try it, given that notmuch is expected to change quite
a bit initially. If there are problems or the completer goes stable,
we'll move it into the upstream zsh repository.

Signed-off-by: martin f. krafft <madduck@debian.org>
Makefile
Makefile.local

index 021fdb82a06d60dff275e1d52ad324525b78321c..64b9d4aa3507c0a6ae30d3cd685703693d19c90f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ EMACS ?= emacs
 gzip = gzip
 
 bash_completion_dir = /etc/bash_completion.d
+zsh_completion_dir = /usr/share/zsh/functions/Completion/Unix
 
 all_deps = Makefile Makefile.local Makefile.config \
                   lib/Makefile lib/Makefile.local
index 933ff4c7de7f8624ce0169e535a1be0d9b2a1579..d579242c64174589dd70338c16d3a8175a4dfde9 100644 (file)
@@ -48,5 +48,10 @@ install-bash:
        install -m0644 contrib/notmuch-completion.bash \
                $(DESTDIR)$(bash_completion_dir)/notmuch
 
+install-zsh:
+       install -d $(DESTDIR)$(zsh_completion_dir)
+       install -m0644 contrib/notmuch-completion.zsh \
+               $(DESTDIR)$(zsh_completion_dir)/notmuch
+
 SRCS  := $(SRCS) $(notmuch_client_srcs)
 CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc notmuch.1.gz