mu/man/mu-cfind.1

103 lines
2.8 KiB
Groff
Raw Normal View History

2011-05-24 21:42:20 +02:00
.TH MU CFIND 1 "May 2011" "User Manuals"
.SH NAME
2011-04-05 06:34:22 +02:00
mu cfind \- find contacts in the \fBmu\fR database and export them for use in
other programs.
.SH SYNOPSIS
.B mu cfind [options] [<pattern>]
.SH DESCRIPTION
\fBmu cfind\fR is the \fBmu\fR command for finding \fIcontacts\fR (name and
e-mail address of people who were either the sender or receiver of
2011-04-05 06:34:22 +02:00
mail). There are different output formats available, for importing the
contacts into various tools.
.SH SEARCHING CONTACTS
When you index your messages (see \fBmu index\fR), \fBmu\fR creates a list of
unique e-mail addresses found, and the accompanying name. In case the same
e-mail address is used with different names, the most recent non-empty name is
used.
\fBmu cfind\fR starts a search for contacts that match a \fIregular
expression\fR. For example:
.nf
$ mu cfind '@gmail\.com'
.fi
would find all contacts with a gmail-address, while
.nf
$ mu cfind Mary
.fi
would find all contact with Mary in either name or e-mail address.
If you do not specify any search expression, \fBmu cfind\fR will return the
full list of contacts.
The regular expressions are Perl-compatible (as per the PCRE-library).
.SH OPTIONS
.TP
2011-04-05 06:34:22 +02:00
\fB\-\-format\fR=\fIplain|mutt-alias|mutt-ab|wl|org-contact|bbdb|csv\fR
set the output format to the given value. The following are available:
.nf
| --format= | description |
|-------------+-----------------------------------|
| plain | default, simple list |
| mutt-alias | mutt alias-format |
| mutt-ab | mutt external address book format |
| wl | wanderlust addressbook format |
| org-contact | org-mode org-contact format |
| bbdb | BBDB format |
| csv | comma-separated values |
.fi
.SH RETURN VALUE
\fBmu cfind\fR returns 0 upon successful completion; if it the a search was
performed, there needs to be a least one match. Anything else leads to a
non-zero return value, for example:
.sh
| code | meaning |
|------+--------------------------------|
| 0 | ok |
| 1 | general error |
| 2 | no matches (for 'mu cfind') |
.si
.SH INTEGRATION WITH MUTT
You can use \fBmu cfind\fR as an external address book server for
\fBmutt\fR. For this to work add the following to your \fImuttrc\fR:
.sh
set query_command = "mu cfind --format=mutt-ab '%s'"
.si
Now, in mutt, you can easily search for e-mail address using the
\fBquery\fR-command, which is by default accessible by pressing \fBQ\fR.
.SH BUGS
2011-04-05 06:34:22 +02:00
Please report bugs if you find them at
\fBhttp://code.google.com/p/mu0/issues/list\fR.
.SH AUTHOR
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
.SH "SEE ALSO"
2011-04-05 06:34:22 +02:00
.BR mu(1) mu-index(1) mu-find(1) pcrepattern(3)