Merge remote-tracking branch 'matthias-margush/file-type-detection-fix'

This commit is contained in:
Maxime Coste 2020-02-25 20:12:22 +11:00
commit a2506f3b22

View File

@ -1,6 +1,6 @@
hook global BufOpenFile .* %{ evaluate-commands %sh{
if [ -z "${kak_opt_filetype}" ]; then
mime=$(file -b -i -L "${kak_buffile}")
mime=$(file -b --mime-type -L "${kak_buffile}")
mime=${mime%;*}
case "${mime}" in
application/*+xml) filetype="xml" ;;