about summary refs log tree commit diff stats
path: root/modules/by-name/lf/lf/ctpv/helpers.sh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-07 12:51:26 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-07 12:51:26 +0200
commit0a4d32b5ea2a29970f9e20fa4a4f99868244da64 (patch)
tree25515146d8a7d8e6ed0d46b786c413003e3e735f /modules/by-name/lf/lf/ctpv/helpers.sh
parentfeat(modules/cargo): Init (diff)
downloadnixos-config-0a4d32b5ea2a29970f9e20fa4a4f99868244da64.zip
fix(modules/lf/ctpv/prev/helpers): Avoid unset variable error
Diffstat (limited to '')
-rw-r--r--modules/by-name/lf/lf/ctpv/helpers.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/by-name/lf/lf/ctpv/helpers.sh b/modules/by-name/lf/lf/ctpv/helpers.sh
index 6dc7fee6..30e4483a 100644
--- a/modules/by-name/lf/lf/ctpv/helpers.sh
+++ b/modules/by-name/lf/lf/ctpv/helpers.sh
@@ -59,7 +59,7 @@ preview_xxd() {
     # This has been derived mathematically.
     octet_columns=$(((2 * w - 22) / 7))
 
-    if [ -n "$CTPV_LESS_PREVIEWER" ]; then
+    if [ "${CTPV_LESS_PREVIEWER:-unset}" != "-unset" ]; then
         __base_xxd_preview "$1"
     else
         __base_xxd_preview "$1" -len "$((h * octet_columns))"