]> Sergey Matveev's repositories - nnn.git/commitdiff
Strip cwd path for all non-Linux platforms
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 10 Aug 2019 13:02:36 +0000 (18:32 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 10 Aug 2019 13:02:36 +0000 (18:32 +0530)
src/nnn.c

index 92ee14866de6c2c8fbd3447e0dbf80a3ac313355..6938b8baefe6ae6a49f1dd2cdd089d791c7550f8 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -1301,11 +1301,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__
+#else
                "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
        spawn("sh", "-c", buf, curpath, F_NORMAL);
        free(buf);