$ brew install perl && brew link perl --force
$ brew install cpanm
# .zshrc
# Include ~/.bin in the path
export PATH="$HOME/.bin:/usr/local/bin:$PATH"
# Point perl to local modules
export PERL_LOCAL_LIB_ROOT="$HOME/perl5"
export PERL5LIB="$PERL_LOCAL_LIB_ROOT/lib/perl5"
export PERL_MB_OPT="--install_base \"$PERL_LOCAL_LIB_ROOT\""
export PERL_MM_OPT="INSTALL_BASE=$PERL_LOCAL_LIB_ROOT"
export PATH="$PERL_LOCAL_LIB_ROOT/bin:$PATH";
cpanm Digest::SHA\
Mail::Box\
Mail::Header\
Mail::Box::Maildir\
String::ShellQuote\
Term::ReadLine::Gnu
$ cd ~/.bin && wget http://git.notmuchmail.org/git/notmuch/blob_plain/HEAD:/contrib/notmuch-mutt/notmuch-mutt
$ vi notmuch-mutt
--- a/bin/notmuch-mutt
+++ b/bin/notmuch-mutt
@@ -52,7 +52,7 @@ sub search($$$) {
empty_maildir($maildir);
system("notmuch search --output=files $dup_option $query"
. " | sed -e 's: :\\\\ :g'"
- . " | xargs -r -I searchoutput ln -s searchoutput $maildir/cur/");
+ . " | xargs -I searchoutput ln -s searchoutput $maildir/cur/");
}
sub prompt($$) {
--
$ chmod +x notmuch-mutt
$ cd ~/.mutt && wget http://git.notmuchmail.org/git/notmuch/blob_plain/HEAD:/contrib/notmuch-mutt/notmuch-mutt.rc
# .mutt/muttrc
source ~/.mutt/notmuch-mutt.rc
Open mutt and open a search with <F8>
.