From 75b30174be20fa50414176b30ea75a484b547c6e Mon Sep 17 00:00:00 2001 From: krolyxon Date: Thu, 26 Jan 2023 11:20:56 +0530 Subject: [PATCH] use bat instead of cat in lf text preview --- .config/lf/scope | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/lf/scope b/.config/lf/scope index 50ab4d5..2b7ffa2 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -25,7 +25,7 @@ case "$(file --dereference --brief --mime-type -- "$1")" in image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;; text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;; 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" ;; audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; video/* )