From 742759f32d014883d2b871adcc0f643f58dbcbc5 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Wed, 25 Aug 2021 16:32:08 +0530 Subject: [PATCH] Exports special variables before running plugins --- src/nnn.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nnn.c b/src/nnn.c index 712b0eb8..0d250712 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6800,6 +6800,8 @@ nochange: rundir[0] = '\0'; clearfilter(); + setexports(newpath); + if (chdir(path) == -1 || !run_plugin(&path, pent->name, runfile, &lastname, &lastdir)) { @@ -7534,6 +7536,8 @@ nochange: } else r = TRUE; + setexports(newpath); + if (!run_plugin(&path, tmp, (ndents ? pdents[cur].name : NULL), &lastname, &lastdir)) { printwait(messages[MSG_FAILED], &presel);