From: 0xACE <0xaced@gmail.com> Date: Sun, 4 Aug 2019 00:49:48 +0000 (+0200) Subject: MacOS support for archive_selection() X-Git-Tag: v2.7~159^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2baa42b877ca0bc338a1852397ca3a0aa7c30b79;p=nnn.git MacOS support for archive_selection() --- diff --git a/src/nnn.c b/src/nnn.c index 1b3557e2..6be09d13 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1303,6 +1303,9 @@ static void archive_selection(const char *cmd, const char *archive, const char * snprintf(buf, CMD_LEN_MAX, #ifdef __linux__ "sed -ze 's|^%s/||' '%s' | xargs -0 %s %s", curpath, g_cppath, cmd, archive); +#elif defined __APPLE__ + "cat '%s' | tr '\\0' '\n' | sed -e 's|^%s/||' | tr '\n' '\\0' | xargs -0 %s %s", + g_cppath, curpath, cmd, archive); #else "cat %s | xargs -0 -o %s %s", g_cppath, cmd, archive); #endif