The completion script depends on bash-completion 1.90 or later, with
_init_completion function. If that's not present, for some reason, the
completion currently fails with an ugly message, messing up user's
command line:
$ notmuch -bash: _init_completion: command not found
It's better to just not complete
Rewrite the bash completion script to actually do something
useful. Supported completions:
* All the notmuch commands, command line arguments, and values for
keyword arguments.
* Tags after + and - in 'notmuch tag'.
* Config options in 'notmuch config', and some config option values.
* Search prefixes in all commands that use search terms.
* Tags after tag: prefix in search terms.
* User's email addresses after from: and to: in search terms.
This is all based on the bash-completion package [1], and will not
work without it.
[1] http://bash-completion.alioth.debian.org/
Various typo fixes in comments within the Makefile and other build scripts.
Signed-off-by: Pieter Praet <pieter@praet.org>
Edited-by: Carl Worth <cworth@cworth.org> Restricted to just build files.
Such as:
mkdir build
cd build
../configure
make
This is implemented by having the configure script set a srcdir
variable in Makefile.config, and then sprinkling $(srcdir) into
various make rules. We also use vpath directives to convince GNU make
to find the source files from the original source directory.
add --bashcompletiondir and --zshcompletiondir (like --emacslispdir) to choose
installation dir for bash/zsh completion files
Make some features optional:
--without-emacs / --with-emacs=no do not install lisp file
--without-bash-completion / --with-bash-completion=no do not install bash
files
--without-zsh-completion / --with-zsh-completion=no do not install zsh files
By default, everything is enabled. You can reenable something with
--with-feature=yes
The original "contrib" name is lousy. Everything in notmuch has been
contributed, and we are integrating as much of it as possible, (rather
than making users grub through contrib looking for useful pieces to
install).
Meanwhile, the only things we have in contrib are command-line
completion scripts, so "completion" makes more sense as a name, (and
helps make "./configure" slightly less ambiguous).