X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=adf64a0aebf3ae0a1654cd7312af4c70cbdb742d;hp=78047b5f424de5bf9b6d55548d6c960e1bbceb8f;hb=f3fc97c0008c1d48ccac88c52b5bae61460bfa3f;hpb=92d8eae8f182e4eebc87d76f8d4f37e6c018883a diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 78047b5f..adf64a0a 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 <