summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2019-04-20 10:30:05 +0200
committerMaxime Coste <mawww@kakoune.org>2019-04-20 10:30:05 +0200
commitb65fcb5d1a9b694e5fbd9b4e5887f72f5e0f5853 (patch)
treee680176ba9a6ee4cd3e6a2a9f9861f853a6f7599
parenteb2c238d43f5a97bad3ff42f9393f9c1fa201bfe (diff)
parentba1274f73cbef10998013b45d4121cd48c52dde2 (diff)
Merge remote-tracking branch 'alexherbo2/rc-mime-detection'
-rw-r--r--rc/detection/file.kak3
1 files changed, 2 insertions, 1 deletions
diff --git a/rc/detection/file.kak b/rc/detection/file.kak
index 073e9ce0..d0f8ec5e 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 -L "${kak_buffile}")
+ mime=${mime%;*}
case "${mime}" in
application/*+xml) filetype="xml" ;;
image/*+xml) filetype="xml" ;; #SVG