file.kak: Dereference symlinks

This commit is contained in:
Alex Leferry 2 2019-04-17 12:37:54 +02:00
parent 313c6eadc7
commit ba1274f73c

View File

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