]> Sergey Matveev's repositories - nnn.git/commitdiff
Exports special variables before running plugins
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 25 Aug 2021 11:02:08 +0000 (16:32 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 25 Aug 2021 11:02:45 +0000 (16:32 +0530)
src/nnn.c

index 712b0eb8d5f2c222abf41a5d98a5a7e146344581..0d250712f26519cd2bbcd42a06177201887cab95 100644 (file)
--- 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);