From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/2] completion: complete notmuch insert --folder to maildir folders only
Date: Mon, 10 Nov 2014 21:35:43 +0200 [thread overview]
Message-ID: <1415648143-19923-2-git-send-email-jani@nikula.org> (raw)
In-Reply-To: <1415648143-19923-1-git-send-email-jani@nikula.org>
The --folder option expects a folder relative from maildir root, so
complete like the folder: search term.
---
completion/notmuch-completion.bash | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
index 386437333742..a756b22339cb 100644
--- a/completion/notmuch-completion.bash
+++ b/completion/notmuch-completion.bash
@@ -188,7 +188,10 @@ _notmuch_insert()
$split &&
case "${prev}" in
--folder)
- _filedir
+ local path=`notmuch config get database.path`
+ compopt -o nospace
+ COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \
+ sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
return
;;
esac
--
2.1.1
next prev parent reply other threads:[~2014-11-10 19:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 19:35 [PATCH 1/2] completion: complete notmuch insert --keep and --no-hooks options Jani Nikula
2014-11-10 19:35 ` Jani Nikula [this message]
2014-12-31 20:36 ` [PATCH 2/2] completion: complete notmuch insert --folder to maildir folders only David Bremner
2015-01-01 12:12 ` Tomi Ollila
2015-01-01 14:33 ` Jani Nikula
2015-01-01 14:34 ` [PATCH v2] " Jani Nikula
2015-01-02 16:22 ` [PATCH 1/2] completion: complete notmuch insert --keep and --no-hooks options David Bremner
2015-01-02 17:58 ` Jani Nikula
2015-01-02 18:03 ` [PATCH] completion: remove the broken notmuch-completion.tcsh Jani Nikula
2015-01-02 19:57 ` Tomi Ollila
2015-01-03 8:46 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415648143-19923-2-git-send-email-jani@nikula.org \
--to=jani@nikula.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).