From 313c6eadc7ddd79f5057298e9d9751eb284a0857 Mon Sep 17 00:00:00 2001 From: Alex Leferry 2 Date: Wed, 17 Apr 2019 12:35:11 +0200 Subject: [PATCH] file.kak: Use -i POSIX option name https://ss64.com/osx/file.html https://freebsd.org/cgi/man.cgi?query=file --- rc/detection/file.kak | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rc/detection/file.kak b/rc/detection/file.kak index 073e9ce0a..2a0632c11 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