mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
completion: add proper completion of folder: and path:
Complete folder: to maildir folders and path: to directories in mail store.
This commit is contained in:
parent
92c3fd938e
commit
d5822224da
1 changed files with 12 additions and 1 deletions
|
@ -49,8 +49,19 @@ _notmuch_search_terms()
|
||||||
from:*)
|
from:*)
|
||||||
COMPREPLY=( $(compgen -P "from:" -W "`_notmuch_user_emails`" -- ${cur##from:}) )
|
COMPREPLY=( $(compgen -P "from:" -W "`_notmuch_user_emails`" -- ${cur##from:}) )
|
||||||
;;
|
;;
|
||||||
|
path:*)
|
||||||
|
local path=`notmuch config get database.path`
|
||||||
|
compopt -o nospace
|
||||||
|
COMPREPLY=( $(compgen -d "$path/${cur##path:}" | sed "s|^$path/||" ) )
|
||||||
|
;;
|
||||||
|
folder:*)
|
||||||
|
local path=`notmuch config get database.path`
|
||||||
|
compopt -o nospace
|
||||||
|
COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \
|
||||||
|
sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
local search_terms="from: to: subject: attachment: tag: id: thread: folder: date:"
|
local search_terms="from: to: subject: attachment: tag: id: thread: folder: path: date:"
|
||||||
compopt -o nospace
|
compopt -o nospace
|
||||||
COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue