]> git.notmuchmail.org Git - notmuch/blobdiff - completion/notmuch-completion.bash
completion: complete notmuch dump --gzip option
[notmuch] / completion / notmuch-completion.bash
index 94ea2d56943e28afc65056ea93f5c3b45fee38a1..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
@@ -196,7 +199,7 @@ _notmuch_insert()
     ! $split &&
     case "${cur}" in
        --*)
-           local options="--create-folder --folder="
+           local options="--create-folder --folder= --keep --no-hooks"
            compopt -o nospace
            COMPREPLY=( $(compgen -W "$options" -- ${cur}) )
            return
@@ -332,7 +335,7 @@ _notmuch_address()
            return
            ;;
        --output)
-           COMPREPLY=( $( compgen -W "sender recipients" -- "${cur}" ) )
+           COMPREPLY=( $( compgen -W "sender recipients count" -- "${cur}" ) )
            return
            ;;
        --sort)