# Note: nnn auto-detects and invokes this plugin if available
# Whitespace is used as delimiter for read.
# The plugin doesn't support filenames with leading or trailing whitespace
+# To use NNN_LIST your shell must support readlink(1)
#
# Capabilities:
# 1. Basic file rename
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
items=("~")
while IFS='' read -r line; do
+ if [ "$NNN_LIST" -eq 1 ]; then
+ line=$(readlink "$line" || printf "%s" "$line")
+ fi
+
items+=("$line");
done < <(printf "%s\n" "$arr")
case SEL_RENAMEMUL:
endselection(TRUE);
setenv("INCLUDE_HIDDEN", xitoa(cfg.showhidden), 1);
+ setenv("NNN_LIST", listpath
+ ? xitoa(is_prefix(path, listpath, xstrlen(listpath)))
+ : "0", 1);
if (!(getutil(utils[UTIL_BASH])
&& plugscript(utils[UTIL_NMV], F_CLI))