]> Sergey Matveev's repositories - nnn.git/commitdiff
xargs: use -o, rm: change -I to -i
authorArun Prakash Jana <engineerarun@gmail.com>
Tue, 27 Nov 2018 22:57:33 +0000 (04:27 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Tue, 27 Nov 2018 22:57:33 +0000 (04:27 +0530)
src/nnn.c

index 3d3d4e5cb040c26d24deb813df6b4dfb27bb6027..7d37716ab6aaa3e0e3b73872529817d49a3d2ce0 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -3083,11 +3083,11 @@ nochange:
                        }
 
                        if (sel == SEL_CP)
-                               snprintf(g_buf, MAX_CMD_LEN, "xargs -0 -a %s cp -iRp -t .", g_cppath);
+                               snprintf(g_buf, MAX_CMD_LEN, "cat %s | xargs -0 -o cp -iRp -t .", g_cppath);
                        else if (sel == SEL_MV)
-                               snprintf(g_buf, MAX_CMD_LEN, "xargs -0 -a %s mv -i -t .", g_cppath);
+                               snprintf(g_buf, MAX_CMD_LEN, "cat %s | xargs -0 -o mv -i -t .", g_cppath);
                        else /* SEL_RMMUL */
-                               snprintf(g_buf, MAX_CMD_LEN, "xargs -0 -a %s rm -Ir", g_cppath);
+                               snprintf(g_buf, MAX_CMD_LEN, "cat %s | xargs -0 -o rm -ir", g_cppath);
 
                        spawn("sh", "-c", g_buf, path, F_NORMAL | F_SIGINT);