From 2dfbb7598b6869511c5d654221664bc9b2230413 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Thu, 1 Jan 2015 16:34:30 +0200 Subject: [PATCH] completion: complete notmuch insert --folder to maildir folders only 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 38643733..d58dc8be 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}" | \ + sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) ) return ;; esac