]> Sergey Matveev's repositories - nnn.git/commitdiff
Updated .nmv to support current when NNN_LIST
authorKlzXS <klzx+github@klzx.cf>
Sun, 7 Nov 2021 21:08:43 +0000 (22:08 +0100)
committerKlzXS <klzx+github@klzx.cf>
Sun, 7 Nov 2021 21:08:43 +0000 (22:08 +0100)
NNN_LIST now should pass listroo

plugins/.nmv
src/nnn.c

index 66ca6b3f42a253ee028c527014cfcb7c0bf47336..4adab476cab44c1d03bcea7962d1c99b4ac727d0 100755 (executable)
@@ -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
index 2a2627a2fba3abe697fe76dcc400e9efdc58bac9..c7440149412d263e1e491835eef5545caf3f522c 100644 (file)
--- 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))