From 98d69fc91fac21195601d914c8aee6071aa005e1 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Tue, 29 Mar 2022 18:50:35 -0500 Subject: [PATCH] zprofile: adjust condition for `LESSOPEN` export Split tests for condition for `export LESSOPEN` separate per convention --- runcoms/zprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runcoms/zprofile b/runcoms/zprofile index b12367a..5b8b638 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -66,6 +66,6 @@ fi # Set the Less input preprocessor. # Try both `lesspipe` and `lesspipe.sh` as either might exist on a system. -if [[ -z "$LESSOPEN" && (( $#commands[(i)lesspipe(|.sh)] )) ]]; then +if [[ -z "$LESSOPEN" ]] && (( $#commands[(i)lesspipe(|.sh)] )); then export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-" fi