feat(lf): Add JSON preview (#1090)

This commit is contained in:
Oscar Lastra 2022-03-13 13:52:08 -06:00 committed by GitHub
parent fe4ea560ac
commit 0daa4d3450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ case "$(file --dereference --brief --mime-type -- "$1")" in
image/*) image "$1" "$2" "$3" "$4" "$5" ;; image/*) image "$1" "$2" "$3" "$4" "$5" ;;
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) bat --terminal-width "$4" -f "$1" ;; text/* | */xml | application/json) bat --terminal-width "$4" -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/* )