Merge remote-tracking branch 'eraserhd/detect-mime-script-types'

This commit is contained in:
Maxime Coste 2020-06-16 19:10:01 +10:00
commit 5c02bb2030

View File

@ -7,8 +7,10 @@ hook global BufOpenFile .* %{ evaluate-commands %sh{
image/*+xml) filetype="xml" ;; #SVG
message/rfc822) filetype="mail" ;;
text/x-shellscript) filetype="sh" ;;
text/x-script.*) filetype="${mime#text/x-script.}" ;;
text/x-*) filetype="${mime#text/x-}" ;;
text/*) filetype="${mime#text/}" ;;
application/x-*) filetype="${mime#application/x-}" ;;
application/*) filetype="${mime#application/}" ;;
esac
if [ -n "${filetype}" ]; then