Krolyxon
Commit 75b3017

Branches

Refs →

dotfiles-x1175b3017

use bat instead of cat in lf text preview

Author
krolyxon
Date
2023-01-26 11:20 +0530
Parent
8aed556
Commit
75b30174be20fa50414176b30ea75a484b547c6e

+1 −1

1 file changed

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