X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=1cd616b31314f78fbbc74fd4b1105d7d5496359c;hb=6802b333eb356fdeafd97a4e4ed74999d055a852;hp=78047b5f424de5bf9b6d55548d6c960e1bbceb8f;hpb=6a833a6e83865f6999707cc30768d07e1351c2cb;p=notmuch diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 78047b5f..1cd616b3 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 <