X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=15425697a215290e79a4d58e7cdf4884f3a5f2bc;hp=78047b5f424de5bf9b6d55548d6c960e1bbceb8f;hb=HEAD;hpb=07dff496304d6dc2e8033a18691b095ed9cd212f diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 78047b5f..3748846e 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 <