1 Return-Path: <tomi.ollila@iki.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 1D1F7431FBD
\r
6 for <notmuch@notmuchmail.org>; Mon, 24 Mar 2014 14:14:26 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id pCo4PU9nb0Nv for <notmuch@notmuchmail.org>;
\r
16 Mon, 24 Mar 2014 14:14:18 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id B4DF1431FB6
\r
19 for <notmuch@notmuchmail.org>; Mon, 24 Mar 2014 14:14:18 -0700 (PDT)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 4B7FB1000E5;
\r
22 Mon, 24 Mar 2014 23:14:14 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH 1/2] completion: add proper completion of folder: and
\r
27 In-Reply-To: <1394656429-1409-1-git-send-email-jani@nikula.org>
\r
28 References: <1394656429-1409-1-git-send-email-jani@nikula.org>
\r
29 User-Agent: Notmuch/0.17+156~g1203750 (http://notmuchmail.org) Emacs/24.3.1
\r
30 (x86_64-unknown-linux-gnu)
\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
32 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
33 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
34 Date: Mon, 24 Mar 2014 23:14:14 +0200
\r
35 Message-ID: <m2ior3s3ix.fsf@guru.guru-group.fi>
\r
37 Content-Type: text/plain
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Mon, 24 Mar 2014 21:14:26 -0000
\r
52 On Wed, Mar 12 2014, Jani Nikula <jani@nikula.org> wrote:
\r
54 > Complete folder: to maildir folders and path: to directories in mail
\r
64 COMPREPLY=( $(cd $path; compgen -d "${cur#path:}") ) might also work but...
\r
66 > completion/notmuch-completion.bash | 13 ++++++++++++-
\r
67 > 1 file changed, 12 insertions(+), 1 deletion(-)
\r
69 > diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
\r
70 > index 0f132043dea5..59f1a3ea6431 100644
\r
71 > --- a/completion/notmuch-completion.bash
\r
72 > +++ b/completion/notmuch-completion.bash
\r
73 > @@ -49,8 +49,19 @@ _notmuch_search_terms()
\r
75 > COMPREPLY=( $(compgen -P "from:" -W "`_notmuch_user_emails`" -- ${cur##from:}) )
\r
78 > + local path=`notmuch config get database.path`
\r
79 > + compopt -o nospace
\r
80 > + COMPREPLY=( $(compgen -d "$path/${cur##path:}" | sed "s|^$path/||" ) )
\r
83 > + local path=`notmuch config get database.path`
\r
84 > + compopt -o nospace
\r
85 > + COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \
\r
86 > + sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
\r
89 > - local search_terms="from: to: subject: attachment: tag: id: thread: folder: date:"
\r
90 > + local search_terms="from: to: subject: attachment: tag: id: thread: folder: path: date:"
\r
91 > compopt -o nospace
\r
92 > COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )
\r
97 > _______________________________________________
\r
98 > notmuch mailing list
\r
99 > notmuch@notmuchmail.org
\r
100 > http://notmuchmail.org/mailman/listinfo/notmuch
\r