diff --git a/.config/lf/preview/preview b/.config/lf/preview/preview index 53bf3ec8a..aa8912d88 100755 --- a/.config/lf/preview/preview +++ b/.config/lf/preview/preview @@ -19,16 +19,15 @@ image() { } video() { - thumb="$("$HOME/.config/lf/preview/vidthumb" "$f")" || ( + thumb="$("$HOME/.config/lf/preview/vidthumb" "$f")" || { printf "%b" "${RED}vidthumb failed to execute${RESET}" return 1 - ) + } image "$thumb" } text() { - bat --color=always --style=plain --pager=never --terminal-width "$((w - 2))" "$f" && exit 1 - cat "$f" + bat --color=always --style=plain --pager=never --terminal-width "$((w - 2))" "$@" "$f" exit 1 } @@ -93,7 +92,7 @@ if command -v gio 1>/dev/null 2>&1; then fi case "$(file -b "$f")" in - *text*) text "$f" ;; + *text*) text ;; *) printf "%b" "\$(file --mime-type)\t\t\t : $filerun\n" [ -n "$giorun" ] && printf "%b" "\$(gio info)\t\t\t\t : $giorun\n"