bin: update b function to use mime type
This commit is contained in:
parent
491c1b1faa
commit
7985f33b53
|
@ -10,8 +10,9 @@
|
||||||
#else
|
#else
|
||||||
arg=$(test $# -gt 0 && echo "${@:-1}" || echo .)
|
arg=$(test $# -gt 0 && echo "${@:-1}" || echo .)
|
||||||
file $arg | grep -v --color=never directory
|
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 "$@";;
|
*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
|
esac
|
||||||
#fi
|
#fi
|
||||||
|
|
Loading…
Reference in New Issue