nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1508874b5a783771933c7f09921b2caf463a64f5
parent e686b94f7ea28255c150e432fe723fd092cb17a3
Author: Arun <engineerarun@gmail.com>
Date:   Mon,  8 Nov 2021 13:34:39 +0000

Merge pull request #1224 from KlzXS/nmv_list_current

Updated .nmv to support current when NNN_LIST
Diffstat:
Mplugins/.nmv | 6+++++-
Msrc/nnn.c | 4+---
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git 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 @@ -7267,9 +7267,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))