bin: update b function to use mime type

This commit is contained in:
xerus2000 2020-11-13 13:33:01 +01:00
parent 491c1b1faa
commit 7985f33b53
1 changed files with 3 additions and 2 deletions

View File

@ -10,8 +10,9 @@
#else
arg=$(test $# -gt 0 && echo "${@:-1}" || echo .)
file $arg | grep -v --color=never directory
case "$(file --dereference $arg)" in
case "$(file --dereference --mime $arg)" in
*directory) ls -l --color=auto --almost-all --human-readable --group-directories-first --file-type --dereference-command-line "$@";;
*text*|*JSON*) bat --style header "$@";;
*binary*) ;;
*) bat --style header "$@";;
esac
#fi