1 Return-Path: <jani@nikula.org>
\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 8BE4E431FC2
\r
6 for <notmuch@notmuchmail.org>; Wed, 12 Mar 2014 13:34:00 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 LdTbzG44Vehg for <notmuch@notmuchmail.org>;
\r
16 Wed, 12 Mar 2014 13:33:55 -0700 (PDT)
\r
17 Received: from mail-ea0-f178.google.com (mail-ea0-f178.google.com
\r
18 [209.85.215.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id D9EBF431FAE
\r
21 for <notmuch@notmuchmail.org>; Wed, 12 Mar 2014 13:33:54 -0700 (PDT)
\r
22 Received: by mail-ea0-f178.google.com with SMTP id a15so88446eae.9
\r
23 for <notmuch@notmuchmail.org>; Wed, 12 Mar 2014 13:33:52 -0700 (PDT)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=1e100.net; s=20130820;
\r
26 h=x-gm-message-state:from:to:cc:subject:date:message-id;
\r
27 bh=hvVTFdmAUxWnprdLjO0d7bYMiHWBOiGLekQp/jIe3Hs=;
\r
28 b=ZZcZvQDeRmV+ilbwyRvmZF3RmvMzpztDuojSA6/zJXoDm17eK8AWDHtTaAzqVu0s0h
\r
29 kcZQZkats4wIeH5rYo9uSYY8HC0UtF8BdbfW4erV1JMl9HC5iI9pVsBTh1FGbzvscr26
\r
30 1sReCfsnlLzO0IJGMR2KUNPNQn3Wacxyl8bwg/RIUqrJPIFrvhKkJeD+rEjB3sIn+562
\r
31 cqInaMvw5/ycecsf14cqOUH9mGAhUT/x9yAnjXVFDYoJesMkaxmiL2HXU0MOlk+FLm6m
\r
32 xWcDHGqBiiTk8RbCcKPZEESgcP34bG/6RkUL3UtUmld/b5OmWH12eDIWrKGhCoFL1bVs
\r
35 ALoCoQnfCB4yjfwyi0m74xsWj7QxvaOFJdKptxNm9R4ETHvqXl6rlV2BXJTn6gBvYc/poGsZEsU9
\r
36 X-Received: by 10.14.200.194 with SMTP id z42mr69763een.112.1394656432133;
\r
37 Wed, 12 Mar 2014 13:33:52 -0700 (PDT)
\r
38 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
40 by mx.google.com with ESMTPSA id f45sm20973eeg.5.2014.03.12.13.33.50
\r
41 for <multiple recipients>
\r
42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
43 Wed, 12 Mar 2014 13:33:51 -0700 (PDT)
\r
44 From: Jani Nikula <jani@nikula.org>
\r
45 To: notmuch@notmuchmail.org
\r
46 Subject: [PATCH 1/2] completion: add proper completion of folder: and path:
\r
47 Date: Wed, 12 Mar 2014 22:33:48 +0200
\r
48 Message-Id: <1394656429-1409-1-git-send-email-jani@nikula.org>
\r
49 X-Mailer: git-send-email 1.9.0
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Wed, 12 Mar 2014 20:34:00 -0000
\r
64 Complete folder: to maildir folders and path: to directories in mail
\r
67 completion/notmuch-completion.bash | 13 ++++++++++++-
\r
68 1 file changed, 12 insertions(+), 1 deletion(-)
\r
70 diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
\r
71 index 0f132043dea5..59f1a3ea6431 100644
\r
72 --- a/completion/notmuch-completion.bash
\r
73 +++ b/completion/notmuch-completion.bash
\r
74 @@ -49,8 +49,19 @@ _notmuch_search_terms()
\r
76 COMPREPLY=( $(compgen -P "from:" -W "`_notmuch_user_emails`" -- ${cur##from:}) )
\r
79 + local path=`notmuch config get database.path`
\r
80 + compopt -o nospace
\r
81 + COMPREPLY=( $(compgen -d "$path/${cur##path:}" | sed "s|^$path/||" ) )
\r
84 + local path=`notmuch config get database.path`
\r
85 + compopt -o nospace
\r
86 + COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \
\r
87 + sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
\r
90 - local search_terms="from: to: subject: attachment: tag: id: thread: folder: date:"
\r
91 + local search_terms="from: to: subject: attachment: tag: id: thread: folder: path: date:"
\r
93 COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )
\r