X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=d44b2a2811f016ce052296f61a8c12bbc77cf3d8;hp=29cdf4316528e9b6ecaa22ff51ad5646edac7412;hb=4d486cf94d3fcfe4f07daf7dc65c9de04c7cfdd5;hpb=8540c36a96f5270d84d19dcbfbc9f6463f1653fd diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 29cdf431..d44b2a28 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -16,7 +16,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/ . +# along with this program. If not, see https://www.gnu.org/licenses/ . # # Author: Jani Nikula # @@ -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 <