]> git.notmuchmail.org Git - notmuch/blobdiff - completion/notmuch-completion.bash
completion: complete notmuch insert --folder to maildir folders only
[notmuch] / completion / notmuch-completion.bash
index 386437333742cbc887d92a851d37a2a438d6b684..d58dc8bed60f3640529d0b06dd5e294308acbfae 100644 (file)
@@ -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