From: KlzXS Date: Sun, 7 Nov 2021 21:08:43 +0000 (+0100) Subject: Updated .nmv to support current when NNN_LIST X-Git-Tag: v4.4~13^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=22096ee0cd9fe5ea8ac964cae7a7d686964d0146;p=nnn.git Updated .nmv to support current when NNN_LIST NNN_LIST now should pass listroo --- diff --git a/plugins/.nmv b/plugins/.nmv index 66ca6b3f..4adab476 100755 --- a/plugins/.nmv +++ b/plugins/.nmv @@ -51,7 +51,11 @@ else findcmd="$findcmd ! -name \".*\"" fi - findcmd="$findcmd -print" + if [ -z "$NNN_LIST" ]; then + findcmd="$findcmd -print" + else + findcmd="$findcmd -printf "'"'"$NNN_LIST/%P\n"'"' + fi arr=$(eval "$findcmd" | sort) fi diff --git a/src/nnn.c b/src/nnn.c index 2a2627a2..c7440149 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -7269,9 +7269,7 @@ nochange: 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); + setenv("NNN_LIST", listpath ? listroot : "", 1); if (!(getutil(utils[UTIL_BASH]) && plugscript(utils[UTIL_NMV], F_CLI))