database error
[notmuch-archives.git] / 99 / 0b31240edb4c80df7e702115edc921246bfd69
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
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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
26  path:\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
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\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
51 \r
52 On Wed, Mar 12 2014, Jani Nikula <jani@nikula.org> wrote:\r
53 \r
54 > Complete folder: to maildir folders and path: to directories in mail\r
55 > store.\r
56 > ---\r
57 \r
58 Series LGTM.\r
59 \r
60 \r
61 Tomi\r
62 \r
63 \r
64 COMPREPLY=( $(cd $path; compgen -d "${cur#path:}") ) might also work but...\r
65 \r
66 >  completion/notmuch-completion.bash | 13 ++++++++++++-\r
67 >  1 file changed, 12 insertions(+), 1 deletion(-)\r
68 >\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
74 >       from:*)\r
75 >           COMPREPLY=( $(compgen -P "from:" -W "`_notmuch_user_emails`" -- ${cur##from:}) )\r
76 >           ;;\r
77 > +     path:*)\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
81 > +         ;;\r
82 > +     folder:*)\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
87 > +         ;;\r
88 >       *)\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
93 >           ;;\r
94 > -- \r
95 > 1.9.0\r
96 >\r
97 > _______________________________________________\r
98 > notmuch mailing list\r
99 > notmuch@notmuchmail.org\r
100 > http://notmuchmail.org/mailman/listinfo/notmuch\r