* [PATCH] completion: add bash completion for query: and property:
@ 2016-12-17 10:50 Jani Nikula
0 siblings, 0 replies; only message in thread
From: Jani Nikula @ 2016-12-17 10:50 UTC (permalink / raw)
To: notmuch
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.
---
completion/notmuch-completion.bash | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
index d44b2a2811f0..7cad047f8499 100644
--- a/completion/notmuch-completion.bash
+++ b/completion/notmuch-completion.bash
@@ -117,8 +117,12 @@ _notmuch_search_terms()
compopt -o nospace
COMPREPLY=( $(compgen -P "mimetype:" -W "`_notmuch_mimetype ${cur}`" -- ${cur##mimetype:}) )
;;
+ query:*)
+ compopt -o nospace
+ COMPREPLY=( $(compgen -P "query:" -W "`notmuch config list | sed -n '/^query\./s/^query\.\([^=]*\)=.*/\1/p'`" -- ${cur##query:}) )
+ ;;
*)
- local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date: lastmod:"
+ local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date: lastmod: query: property:"
compopt -o nospace
COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )
;;
--
2.10.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-17 10:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-17 10:50 [PATCH] completion: add bash completion for query: and property: Jani Nikula
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).