1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-24 07:53:41 +03:00

Detect text/x-script.* and application/x-* types

This commit is contained in:
Jason Felice 2020-06-12 11:21:38 -04:00
parent 66f15cf4ad
commit bdd7ea6a03

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