diff options
| author | 2019-03-10 23:57:27 +0530 | |
|---|---|---|
| committer | 2019-03-10 23:57:27 +0530 | |
| commit | 9ca3f7d06b88b2eb06da12dff4f9d288e39ca22f (patch) | |
| tree | ffa5259bd5bb57cdef9633a460f56f02f012979a | |
| parent | b9205f17787254ec796bd45874fe14776f96cb30 (diff) | |
| download | nnn-9ca3f7d06b88b2eb06da12dff4f9d288e39ca22f.tar.gz | |
Skip shell invocation to run user-scripts
| -rw-r--r-- | src/nnn.c | 8 | ||||
| -rwxr-xr-x[-rw-r--r--] | user-scripts/edit.sh | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | user-scripts/fzy.sh | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | user-scripts/picker.sh | 0 | ||||
| -rwxr-xr-x[-rw-r--r--] | user-scripts/sxiv.sh | 0 |
5 files changed, 5 insertions, 3 deletions
@@ -3036,13 +3036,15 @@ nochange: continue; mkpath(path, dents[cur].name, newpath); + /* Copy to path so we can return back to earlier dir */ xstrlcpy(path, rundir, PATH_MAX); if (runfile[0]) { xstrlcpy(lastname, runfile, NAME_MAX); - spawn(shell, newpath, lastname, path, F_SHELL); + spawn(newpath, lastname, NULL, path, + F_NORMAL | F_SIGINT); runfile[0] = '\0'; } else - spawn(shell, newpath, NULL, path, F_SHELL); + spawn(newpath, NULL, NULL, path, F_NORMAL | F_SIGINT); rundir[0] = '\0'; cfg.runscript = 0; setdirwatch(); @@ -3807,7 +3809,7 @@ nochange: /* Regular script file */ if (S_ISREG(sb.st_mode)) { tmp = ndents ? dents[cur].name : NULL; - spawn(shell, scriptpath, tmp, path, F_SHELL); + spawn(scriptpath, tmp, NULL, path, F_NORMAL | F_SIGINT); break; } diff --git a/user-scripts/edit.sh b/user-scripts/edit.sh index f23d7a8..f23d7a8 100644..100755 --- a/user-scripts/edit.sh +++ b/user-scripts/edit.sh diff --git a/user-scripts/fzy.sh b/user-scripts/fzy.sh index ba8cfc9..ba8cfc9 100644..100755 --- a/user-scripts/fzy.sh +++ b/user-scripts/fzy.sh diff --git a/user-scripts/picker.sh b/user-scripts/picker.sh index 46168f1..46168f1 100644..100755 --- a/user-scripts/picker.sh +++ b/user-scripts/picker.sh diff --git a/user-scripts/sxiv.sh b/user-scripts/sxiv.sh index 985dce7..985dce7 100644..100755 --- a/user-scripts/sxiv.sh +++ b/user-scripts/sxiv.sh |