summaryrefslogtreecommitdiffstats
path: root/completion
AgeCommit message (Collapse)Author
2020-08-09emacs: Use makefile-gmake-mode in Makefile*sJonas Bernoulli
Use `makefile-gmake-mode' instead of `makefile-mode' because the former also highlights ifdef et al. while the latter does not. "./Makefile.global" and one "Makefile.local" failed to specify any major mode at all but doing so is necessary because Emacs does not automatically figure out that these are Makefiles (of any flavor).
2018-10-02completion: more complete completion for zsh.Vincent Breitmoser
This adds completion files for zsh that cover most of notmuch's cli. The files in completion/zsh are formatted so that they can be found by zsh's completion system if put $fpath. They are also registered to the notmuch-* pattern, so they can be called externally using _dispatch. Update installation recipe and drop debian/notmuch.examples to avoid breakage. This means zsh completion is not installed for debian, to be fixed in a future commit. Amended by db: use regexp searching for address completion. This seems to be fast enough to work without a cache.
2018-05-26cli/show: enable --decrypt=stashDaniel Kahn Gillmor
Add fancy new feature, which makes "notmuch show" capable of actually indexing messages that it just decrypted. This enables a workflow where messages can come in in the background and be indexed using "--decrypt=auto". But when showing an encrypted message for the first time, it gets automatically indexed. This is something of a departure for "notmuch show" -- in particular, because it requires read/write access to the database. However, this might be a common use case -- people get mail delivered and indexed in the background, but only want access to their secret key to happen when they're directly interacting with notmuch itself. In such a scenario, they couldn't search newly-delivered, encrypted messages, but they could search for them once they've read them. Documentation of this new feature also uses a table form, similar to that found in the description of index.decrypt in notmuch-config(1). A notmuch UI that wants to facilitate this workflow while also offering an interactive search interface might instead make use of these additional commands while the user is at the console: Count received encrypted messages (if > 0, there are some things we haven't yet tried to index, and therefore can't yet search): notmuch count tag:encrypted and \ not property:index.decryption=success and \ not property:index.decryption=failure Reindex those messages: notmuch reindex --try-decrypt=true tag:encrypted and \ not property:index.decryption=success and \ not property:index.decryption=failure
2017-12-29cli/reply: make --decrypt take a keywordDaniel Kahn Gillmor
This brings the --decrypt argument to "notmuch reply" into line with the other --decrypt arguments (in "show", "new", "insert", and "reindex"). This patch is really just about bringing consistency to the user interface. We also use the recommended form in the emacs MUA when replying, and update test T350 to match.
2017-12-29cli/show: make --decrypt take a keyword.Daniel Kahn Gillmor
We also expand tab completion for it, update the emacs bindings, and update T350, T357, and T450 to match. Make use of the bool-to-keyword backward-compatibility feature.
2017-12-14cli: add support for only printing the addresses in notmuch addressJani Nikula
The notmuch address output is much more useful for scripts with just the addresses printed. Support this using the --output=address option.
2017-12-11cli/help,completion: added pointers to notmuch-properties(7)Daniel Kahn Gillmor
2017-12-08crypto: add --decrypt=nostash to avoid stashing session keysDaniel Kahn Gillmor
Here's the configuration choice for people who want a cleartext index, but don't want stashed session keys. Interestingly, this "nostash" decryption policy is actually the same policy that should be used by "notmuch show" and "notmuch reply", since they never modify the index or database when they are invoked with --decrypt. We take advantage of this parallel to tune the behavior of those programs so that we're not requesting session keys from GnuPG during "show" and "reply" that we would then otherwise just throw away.
2017-12-08cli/new, insert, reindex: update documentation for --decrypt=autoDaniel Kahn Gillmor
we also include --decrypt=auto in the tab completion.
2017-12-08cli/show: use decryption policy "auto" by default.Daniel Kahn Gillmor
When showing a message, if the user doesn't specify --decrypt= at all, but a stashed session key is known to notmuch, notmuch should just go ahead and try to decrypt the message with the session key (without bothering the user for access to their asymmetric secret key). The user can disable this at the command line with --decrypt=false if they really don't want to look at the e-mail that they've asked notmuch to show them. and of course, "notmuch show --decrypt" still works for accessing the user's secret keys if necessary.
2017-12-08cli/reply: use decryption policy "auto" by default.Daniel Kahn Gillmor
If the user doesn't specify --decrypt= at all, but a stashed session key is known to notmuch, when replying to an encrypted message, notmuch should just go ahead and decrypt. The user can disable this at the command line with --decrypt=false, though it's not clear why they would ever want to do that.
2017-12-08indexing: Change from try_decrypt to decryptDaniel Kahn Gillmor
the command-line interface for indexing (reindex, new, insert) used --try-decrypt; and the configuration records used index.try_decrypt. But by comparison with "show" and "reply", there doesn't seem to be any reason for the "try" prefix. This changeset adjusts the command-line interface and the configuration interface. For the moment, i've left indexopts_{set,get}_try_decrypt alone. The subsequent changeset will address those.
2017-10-21cli/reindex: add --try-decrypt=(true|false)Daniel Kahn Gillmor
Enable override of the index.try_decrypt setting on a per-run basis when invoking "notmuch reindex". This allows the possibility of (for example) an emacs keybinding that adds the cleartext of the currently shown decrypted message to the index, making it searchable in the future. It also enables one-time indexing of all messages matching some query, like so: notmuch reindex tag:encrypted and\ not property:index.decryption=success and\ from:alice@example.org We also update the documentation and tab completion, and add a few more tests.
2017-10-21cli/insert: add --try-decrypt=(true|false)Daniel Kahn Gillmor
Enable override of the index.try_decrypt setting on a per-message basis when invoking "notmuch insert". We also update the documentation and tab completion, and add more tests.
2017-10-21cli/new: add --try-decrypt=(true|false)Daniel Kahn Gillmor
Enable override of the index.try_decrypt setting during "notmuch new" on a per-invocation basis. We update the documentation and tab completion, and also add a test.
2017-08-18completion: add bash completion for "notmuch reindex"Daniel Kahn Gillmor
The main thing that notmuch reindex does is to use search terms, so we can reuse a bunch of the existing completion framework.
2017-03-01completion: complete notmuch emacs-muaJani Nikula
With subcommand handling for external commands we can easily complete 'notmuch emacs-mua' using the existing completion system.
2017-02-26completion: add bash completion for query: and property:Jani Nikula
Add prefix completion for query and property, with value completion for query. Apparently there's no way to get at the available properties in the cli.
2016-11-12completion: complete mimetype: search prefixJani Nikula
Use /etc/mime.types if available, parsed using a sed one-liner, and fall back to a handful of common types otherwise.
2016-06-05Use https instead of http where possibleDaniel Kahn Gillmor
Many of the external links found in the notmuch source can be resolved using https instead of http. This changeset addresses as many as i could find, without touching the e-mail corpus or expected outputs found in tests.
2016-06-05completion: update the location of the bash-completion projectDaniel Kahn Gillmor
Alioth currently redirects to github, so point there instead.
2015-10-21completion: complete lastmod: search prefixJani Nikula
2015-10-21completion: clean up top level completionJani Nikula
Add note about missing features.
2015-10-21completion: complete shared options for each commandJani Nikula
Add support for completing --help, --uuid=, and --version after the subcommand. Do not support shared options at the top level yet due to difficulties in handling options with arguments. --uuid necessitates adding 'compopt -o nospace' also to notmuch new completion, but that just brings it in line with the rest.
2015-10-21completion: complete notmuch count --lastmodJani Nikula
2015-10-21completion: handle notmuch address --deduplicate= optionJani Nikula
Complete notmuch address --deduplicate=(no|mailbox|address).
2015-03-13completion: complete addresses in from:/to: search termsJani Nikula
Use the new notmuch address command to do completion for addresses in from: and to:. Use --output=sender for both for efficiency, even though --output=recipients would be more accurate for to: prefix completion.
2015-03-06completion: update list of commands in zsh completion.David Bremner
This is actually generated by the script in id:1420289900-29717-2-git-send-email-david@tethera.net We may as well update the list of commands while we decide if it's worth automating the process. Note that there is a bit more noise than expected because it alphabetizes all of the commands with their own man pages.
2015-02-23completion: complete notmuch dump --gzip optionJani Nikula
2015-01-24Update completions for Emacs and bashTodd
This adds completions for both Emacs and bash. ZSH does not appear to have completions for search terms.
2015-01-03completion: remove the broken notmuch-completion.tcshJani Nikula
The tcsh completion is minimal yet doesn't work at all. We're better off without it, it's more embarrassing than useful.
2015-01-02completion: complete notmuch insert --folder to maildir folders onlyJani Nikula
The --folder option expects a folder relative from maildir root, so complete like the folder: search term.
2015-01-02completion: complete notmuch insert --keep and --no-hooks optionsJani Nikula
2014-11-05cli: address: Add --output=countMichal Sojka
This output prints how many times was each address encountered during search.
2014-11-05cli: Introduce "notmuch address" commandMichal Sojka
This moves address-related functionality from search command to the new address command. The implementation shares almost all code and some command line options. Options --offset and --limit were intentionally not included in the address command, because they refer to messages numbers, which users do not see in the output. This could confuse users because, for example, they could see more addresses in the output that what was specified with --limit. This functionality can be correctly reimplemented for address subcommand later. Also useless values of --exclude flag were not included in the address command. This was inspired by a patch from Jani Nikula.
2014-11-01cli: search: Add --output={sender,recipients}Michal Sojka
The new outputs allow printing senders, recipients or both of matching messages. To print both, the user can use --output=sender and --output=recipients simultaneously. Currently, the same address can appear multiple times in the output. The next commit will change this. For this reason, tests are introduced there. We use mailbox_t rather than InternetAddressMailbox because we will need to extend it in a following commit. This code is based on a patch from Jani Nikula.
2014-08-22completion: fail silently if _init_completion is not foundJani Nikula
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
2014-03-25completion: complete directory parameters to directories onlyJani Nikula
i.e. don't complete to files if only directories are acceptable.
2014-03-25completion: add proper completion of folder: and path:Jani Nikula
Complete folder: to maildir folders and path: to directories in mail store.
2014-02-03completion: bash completion for notmuch new --quiet optionJani Nikula
notmuch new now has --quiet option, complete it too.
2013-11-11completion: update bash completionJani Nikula
Update bash completion to cover new commands and options: notmuch compact --quiet --backup=DIR notmuch count --output=files --batch --input=FILE notmuch insert --folder=DIR --create-folder notmuch search --exclude=all --duplicate=N notmuch show --include-html notmuch tag --batch --input=FILE --remove-all
2013-03-30completion: update README about bash completion dependenciesJani Nikula
2013-03-28completion: complete bash completion rewriteJani Nikula
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/
2011-06-23fix sum moar typos [build scripts, Makefiles]Pieter Praet
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.
2011-03-09build: Add support for non-source-directory builds.Carl Worth
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.
2011-01-26Makefile: Quote variables used as filenames in shell commandsCarl Worth
This allows support for filenames with spaces in them.
2011-01-26Fix installation of zsh completionMichal Sojka
2011-01-26configure: add options to disable emacs/zsh/bash and choose install dir.Cédric Cabessa
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
2010-04-06Makefile: Move the completion-specific commands to completion/Makefile.localCarl Worth
For much better modularity.
2010-04-06Rename the "contrib" directory to "completion".Carl Worth
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).