X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=7cad047f8499b083640c8a968551c09e9246c094;hp=78047b5f424de5bf9b6d55548d6c960e1bbceb8f;hb=508b5c20fa38b17fa527af075857061f4ed81e2a;hpb=07dff496304d6dc2e8033a18691b095ed9cd212f diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 78047b5f..7cad047f 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -58,6 +58,34 @@ _notmuch_email() sed 's/[^<]*<\([^>]*\)>/\1/' | tr "[:upper:]" "[:lower:]" | sort -u } +_notmuch_mimetype() +{ + # use mime types from mime-support package if available, and fall + # back to a handful of common ones otherwise + if [ -r "/etc/mime.types" ]; then + sed -n '/^[[:alpha:]]/{s/[[:space:]].*//;p;}' /etc/mime.types + else + cat <