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