aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/nnn.c b/src/nnn.c
index aa4c513..c5a59c7 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -128,7 +128,7 @@
#define MSGWAIT '$'
#define REGEX_MAX 48
#define BM_MAX 10
-#define PLUGIN_MAX 10
+#define PLUGIN_MAX 15
#define ENTRY_INCR 64 /* Number of dir 'entry' structures to allocate per shot */
#define NAMEBUF_INCR 0x800 /* 64 dir entries at once, avg. 32 chars per filename = 64*32B = 2KB */
#define DESCRIPTOR_LEN 32
@@ -4941,13 +4941,21 @@ nochange:
}
if (sel == SEL_PLUGKEY) {
+ uchar flag = F_NORMAL;
+
r = get_input("");
tmp = get_kv_val(plug, NULL, r, PLUGIN_MAX, FALSE);
if (!tmp)
goto nochange;
- mkpath(plugindir, tmp, newpath);
- spawn(newpath, (ndents ? dents[cur].name : NULL), path, path, F_NORMAL);
+ if (tmp[0] == '_' && tmp[1]) {
+ xstrlcpy(newpath, ++tmp, PATH_MAX);
+ flag = F_CLI | F_CONFIRM;
+ } else
+ mkpath(plugindir, tmp, newpath);
+
+ spawn(newpath, (ndents ? dents[cur].name : NULL),
+ path, path, flag);
if (cfg.filtermode)
presel = FILTER;