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