diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-01-30 23:38:36 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-01-30 23:41:19 +0530 |
commit | 6aed714347a34fa29d300b0cfa22adfa5f541ba0 (patch) | |
tree | b8bac0db9e4d171d888ae67a469323ee84f4d4f8 /src | |
parent | 46fc9c983c3c62e8c552e70ab9613380b868ae8f (diff) | |
download | nnn-6aed714347a34fa29d300b0cfa22adfa5f541ba0.tar.gz |
Run GUI app as plugin
Diffstat (limited to 'src')
-rw-r--r-- | src/nnn.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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; } |