]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix #1162: run commands as plugin through shell
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 9 Sep 2021 14:08:41 +0000 (19:38 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 9 Sep 2021 14:08:41 +0000 (19:38 +0530)
nnn.1
plugins/README.md
src/nnn.c

diff --git a/nnn.1 b/nnn.1
index d0502c2e4c4ec7e123364e16de94d7f219c2c21f..d25452bca3f7a647de648a05d1bb4ffbdd7fd8b6 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -382,8 +382,8 @@ separated by \fI;\fR:
     export NNN_PLUG='p:-plugin'
 .Ed
 .Pp
-    To assign keys to arbitrary non-background non-shell-interpreted cli
-    commands and invoke like plugins, add \fI!\fR before the command.
+    To assign keys to arbitrary non-background cli commands and invoke like
+    plugins, add \fI!\fR before the command.
 .Bd -literal
     export NNN_PLUG='x:!chmod +x $nnn;g:!git log;s:!smplayer $nnn'
 
index f1cb42ee9a1fe39b3c15ebc451a4f4aff28e986d..68eb9018c82b1d39fa787d578cac84b23a2a0d60 100644 (file)
@@ -137,7 +137,7 @@ export NNN_PLUG='p:-plugin'
 
 ## Running commands as plugin
 
-To assign keys to arbitrary non-background, non-shell-interpreted cli commands and invoke like plugins, add `!` (underscore) before the command.
+To assign keys to arbitrary non-background cli commands and invoke like plugins, add `!` (underscore) before the command.
 
 ```sh
 export NNN_PLUG='x:!chmod +x $nnn;g:!git log;s:!smplayer $nnn'
index 70001873d942c5fd490de035de3353f0130851b0..88a9ab9f06da74b13945443aaca97dc5bec85148 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -5120,9 +5120,9 @@ static bool run_cmd_as_plugin(const char *file, uchar_t flags)
        }
 
        if (flags & F_PAGE)
-               get_output(g_buf, NULL, NULL, -1, TRUE, TRUE);
+               get_output(utils[UTIL_SH_EXEC], g_buf, NULL, -1, TRUE, TRUE);
        else
-               spawn(g_buf, NULL, NULL, NULL, flags);
+               spawn(utils[UTIL_SH_EXEC], g_buf, NULL, NULL, flags);
 
        return TRUE;
 }