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