diff --git a/rc/detection/file.kak b/rc/detection/file.kak index 073e9ce0..2a0632c1 100644 --- a/rc/detection/file.kak +++ b/rc/detection/file.kak @@ -1,6 +1,7 @@ hook global BufOpenFile .* %{ evaluate-commands %sh{ if [ -z "${kak_opt_filetype}" ]; then - mime=$(file -b --mime-type "${kak_buffile}") + mime=$(file -b -i "${kak_buffile}") + mime=${mime%;*} case "${mime}" in application/*+xml) filetype="xml" ;; image/*+xml) filetype="xml" ;; #SVG