Merge remote-tracking branch 'alexherbo2/rc-mime-detection'
This commit is contained in:
commit
b65fcb5d1a
|
@ -1,6 +1,7 @@
|
||||||
hook global BufOpenFile .* %{ evaluate-commands %sh{
|
hook global BufOpenFile .* %{ evaluate-commands %sh{
|
||||||
if [ -z "${kak_opt_filetype}" ]; then
|
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
|
case "${mime}" in
|
||||||
application/*+xml) filetype="xml" ;;
|
application/*+xml) filetype="xml" ;;
|
||||||
image/*+xml) filetype="xml" ;; #SVG
|
image/*+xml) filetype="xml" ;; #SVG
|
||||||
|
|
Loading…
Reference in New Issue
Block a user