aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 407616c..53fad5c 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3843,12 +3843,21 @@ static bool run_cmd_as_plugin(const char *path, const char *file, char *newpath,
if (!*file)
return FALSE;
+ /* Check if GUI flags are to be used */
+ if (*file == '|') {
+ flags = F_NOTRACE | F_NOWAIT;
+ ++file;
+
+ if (!*file)
+ return FALSE;
+ }
+
xstrlcpy(newpath, file, PATH_MAX);
len = strlen(newpath);
if (len > 1 && newpath[len - 1] == '*') {
- flags &= ~F_CONFIRM; /* GUI case */
- newpath[len - 1] = '\0'; /* Get rid of trailing nowait symbol */
+ flags &= ~F_CONFIRM; /* Skip user confirmation */
+ newpath[len - 1] = '\0'; /* Get rid of trailing no confirmation symbol */
--len;
}