mirror of
https://github.com/jarun/nnn.git
synced 2025-01-23 09:16:46 +00:00
commit
0cf77c2ac6
|
@ -1299,12 +1299,7 @@ static void archive_selection(const char *cmd, const char *archive, const char *
|
||||||
{
|
{
|
||||||
char *buf = (char *)malloc(CMD_LEN_MAX * sizeof(char));
|
char *buf = (char *)malloc(CMD_LEN_MAX * sizeof(char));
|
||||||
snprintf(buf, CMD_LEN_MAX,
|
snprintf(buf, CMD_LEN_MAX,
|
||||||
#ifdef __linux__
|
"awk 'BEGIN{RS=\"\\0\"} {gsub(\"%s/\", \"\", $0); printf \"%%s\\0\", $0}' %s | xargs -0 %s %s", curpath, g_cppath, cmd, archive);
|
||||||
"sed -ze 's|^%s/||' '%s' | xargs -0 %s %s", curpath, g_cppath, cmd, archive);
|
|
||||||
#else
|
|
||||||
"cat '%s' | tr '\\0' '\n' | sed -e 's|^%s/||' | tr '\n' '\\0' | xargs -0 %s %s",
|
|
||||||
g_cppath, curpath, cmd, archive);
|
|
||||||
#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