From 6e2e0d6d897fbbe66969f4804f127782e446f5a7 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Wed, 23 Oct 2024 17:12:22 +0200 Subject: [PATCH] lf: clean up preview --- common/.config/lf/preview | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/.config/lf/preview b/common/.config/lf/preview index 31b7ea847..3c3f64d7b 100755 --- a/common/.config/lf/preview +++ b/common/.config/lf/preview @@ -8,7 +8,7 @@ RED="\033[31m" RESET="\033[0m" RS="$(printf "\037")" CACHE="${XDG_CACHE_HOME}/lf/$(stat --printf "%n\0%i\0%F\0%s\0%W\0%Y" -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')" -BAT="bat --style=plain --color=always --italic-text=always --pager=never --tabs=4 --theme=base16 --line-range=":$h" --terminal-width="$((w - 2))"" +BAT="bat --style=plain --color=always --italic-text=always --pager=never --tabs=4 --theme=base16 --line-range=:$h --terminal-width=$((w - 2))" CHAFA="chafa -f sixel -s ${w}x${h} --polite on --animate false" run() { @@ -28,10 +28,10 @@ run() { cached_text() { if [ -f "$CACHE" ]; then # shellcheck disable=SC2086 - $BAT $BAT_ARGS "$CACHE" + $BAT "$CACHE" else # shellcheck disable=SC2086 - run "$@" | tee -p "$CACHE" | $BAT $BAT_ARGS + run "$@" | tee -p "$CACHE" | $BAT fi }