From a300e3267f036308781e6960e683e5da5929bf4f Mon Sep 17 00:00:00 2001 From: KlzXS Date: Wed, 10 Nov 2021 21:51:05 +0100 Subject: [PATCH 1/2] Env variable should be not set, not set to 0 --- plugins/.nmv | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/.nmv b/plugins/.nmv index 4adab476..4146cde2 100755 --- a/plugins/.nmv +++ b/plugins/.nmv @@ -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 From 875a4d8c237f3ba6df5efdb27ff5aa7c7a93c358 Mon Sep 17 00:00:00 2001 From: KlzXS Date: Wed, 10 Nov 2021 21:56:51 +0100 Subject: [PATCH 2/2] -n exists for a reason --- plugins/.nmv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/.nmv b/plugins/.nmv index 4146cde2..bf07b10f 100755 --- a/plugins/.nmv +++ b/plugins/.nmv @@ -66,7 +66,7 @@ printf "%s" "$arr" | awk '{printf("%'"${width}"'d %s\n", NR, $0)}' > "$dst_file" items=("~") while IFS='' read -r line; do - if [ ! -z "$NNN_LIST" ]; then + if [ -n "$NNN_LIST" ]; then line=$(readlink "$line" || printf "%s" "$line") fi