mail: Add contacts lookup script
Added `mail-searchcontacts` script, which uses notmuch to search for all contacts of the mail database. Can be invoked without any arguments to list *all* contacts of the dataase in descending order of message count. Otherwise, it will filter known contacts, first by prioritizing the 'from:' field, and otherwise by searching through the whole database for the keywords passed in. It will also re-format the results so that the list consists of tab-delineated 'mail name' rows. If there is no name, the row will only contain the bare e-mail address. This format is best accepted by aerc, for which the script is written. aerc uses the contacts script for its address completion in editing e-mail headers. Renamed `checkmail` to `mail-check` to fit the naming scheme of `mail-[action]` for mail scripts, to better be able to group them in the shell.
This commit is contained in:
parent
5a256186c2
commit
be688572f5
4 changed files with 44 additions and 3 deletions
|
|
@ -140,7 +140,7 @@ header-layout=To|From,Subject,Cc|Bcc
|
|||
# the first field. Only the email address field is required. The second field,
|
||||
# if present, will be treated as the contact name. Additional fields are
|
||||
# ignored.
|
||||
address-book-cmd=
|
||||
address-book-cmd=mail-searchcontacts %s
|
||||
|
||||
[filters]
|
||||
#
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
gT = :prev-tab<Enter>
|
||||
gt = :next-tab<Enter>
|
||||
<C-t> = :term<Enter>
|
||||
gR = :exec checkmail<Enter>
|
||||
gR = :exec mail-check<Enter>
|
||||
|
||||
[messages]
|
||||
q = :quit<Enter>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue