aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 1b3557e..6be09d1 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