mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 10:28:09 +01:00
completion: add bash completion for query: and property:
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.
This commit is contained in:
parent
df483ed4bd
commit
c7df0cca9e
1 changed files with 5 additions and 1 deletions
|
@ -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}) )
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue