use bat instead of cat in lf text preview

This commit is contained in:
krolyxon 2023-01-26 11:20:56 +05:30
parent 8aed5568c0
commit 75b30174be
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ case "$(file --dereference --brief --mime-type -- "$1")" in
image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;; image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;;
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
text/troff) man ./ "$1" | col -b ;; text/troff) man ./ "$1" | col -b ;;
text/* | */xml | application/json) cat "$1" ;; text/* | */xml | application/json) bat --terminal-width "$(($4-2))" -f "$1" ;;
application/zip) atool --list -- "$1" ;; application/zip) atool --list -- "$1" ;;
audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;;
video/* ) video/* )