diff options
| author | krolyxon <krolyxon@tutanota.com> | 2023-01-26 11:20:56 +0530 |
|---|---|---|
| committer | krolyxon <krolyxon@tutanota.com> | 2023-01-26 11:20:56 +0530 |
| commit | 75b30174be20fa50414176b30ea75a484b547c6e (patch) | |
| tree | 34c1ab27c83b67c41614892b6f5c61dfc4d99e6c | |
| parent | 8aed5568c04766f90b204e6baf362afa54217f34 (diff) | |
use bat instead of cat in lf text preview
| -rwxr-xr-x | .config/lf/scope | 2 |
1 files changed, 1 insertions, 1 deletions
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/* ) |
