]> Sergey Matveev's repositories - nnn.git/commitdiff
Env variable should be not set, not set to 0
authorKlzXS <klzx+github@klzx.cf>
Wed, 10 Nov 2021 20:51:05 +0000 (21:51 +0100)
committerKlzXS <klzx+github@klzx.cf>
Wed, 10 Nov 2021 20:51:05 +0000 (21:51 +0100)
plugins/.nmv

index 4adab476cab44c1d03bcea7962d1c99b4ac727d0..4146cde20b7f0ce720720feed2d6ed37b1c785cf 100755 (executable)
@@ -22,7 +22,6 @@ TMPDIR="${TMPDIR:-/tmp}"
 INCLUDE_HIDDEN="${INCLUDE_HIDDEN:-0}"
 VERBOSE="${VERBOSE:-0}"
 RECURSIVE="${RECURSIVE:-0}"
-NNN_LIST="${NNN_LIST:-0}"
 
 selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
 exit_status=0
@@ -67,7 +66,7 @@ printf "%s" "$arr" | awk '{printf("%'"${width}"'d %s\n", NR, $0)}' > "$dst_file"
 
 items=("~")
 while IFS='' read -r line; do
-       if [ "$NNN_LIST" -eq 1 ]; then
+       if [ ! -z "$NNN_LIST" ]; then
                line=$(readlink "$line" || printf "%s" "$line")
        fi