mirror of
https://github.com/jarun/nnn.git
synced 2025-01-23 17:26:42 +00:00
Strip cwd path for all non-Linux platforms
This commit is contained in:
parent
199fb3ca29
commit
0647c75cd8
|
@ -1301,11 +1301,9 @@ static void archive_selection(const char *cmd, const char *archive, const char *
|
||||||
snprintf(buf, CMD_LEN_MAX,
|
snprintf(buf, CMD_LEN_MAX,
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
"sed -ze 's|^%s/||' '%s' | xargs -0 %s %s", curpath, g_cppath, cmd, archive);
|
"sed -ze 's|^%s/||' '%s' | xargs -0 %s %s", curpath, g_cppath, cmd, archive);
|
||||||
#elif defined __APPLE__
|
#else
|
||||||
"cat '%s' | tr '\\0' '\n' | sed -e 's|^%s/||' | tr '\n' '\\0' | xargs -0 %s %s",
|
"cat '%s' | tr '\\0' '\n' | sed -e 's|^%s/||' | tr '\n' '\\0' | xargs -0 %s %s",
|
||||||
g_cppath, curpath, cmd, archive);
|
g_cppath, curpath, cmd, archive);
|
||||||
#else
|
|
||||||
"cat %s | xargs -0 -o %s %s", g_cppath, cmd, archive);
|
|
||||||
#endif
|
#endif
|
||||||
spawn("sh", "-c", buf, curpath, F_NORMAL);
|
spawn("sh", "-c", buf, curpath, F_NORMAL);
|
||||||
free(buf);
|
free(buf);
|
||||||
|
|
Loading…
Reference in a new issue