]> git.notmuchmail.org Git - notmuch/blobdiff - completion/notmuch-completion.bash
completion: complete notmuch dump --gzip option
[notmuch] / completion / notmuch-completion.bash
index 386437333742cbc887d92a851d37a2a438d6b684..e0498903f22f763f47576be79a7fefa719403dc4 100644 (file)
@@ -61,7 +61,7 @@ _notmuch_search_terms()
                sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
            ;;
        *)
-           local search_terms="from: to: subject: attachment: tag: id: thread: folder: path: date:"
+           local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date:"
            compopt -o nospace
            COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) )
            ;;
@@ -169,7 +169,7 @@ _notmuch_dump()
     ! $split &&
     case "${cur}" in
        -*)
-           local options="--format= --output="
+           local options="--gzip --format= --output="
            compopt -o nospace
            COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
            ;;
@@ -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