From: Arun Prakash Jana Date: Thu, 9 Sep 2021 14:08:41 +0000 (+0530) Subject: Fix #1162: run commands as plugin through shell X-Git-Tag: v4.3~14 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=27e1eb54c461b2d748ed0f6ed7bb2eaaff2252d4;p=nnn.git Fix #1162: run commands as plugin through shell --- diff --git a/nnn.1 b/nnn.1 index d0502c2e..d25452bc 100644 --- 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' diff --git a/plugins/README.md b/plugins/README.md index f1cb42ee..68eb9018 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -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' diff --git a/src/nnn.c b/src/nnn.c index 70001873..88a9ab9f 100644 --- 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; }