]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix build break on macOS
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 14 Oct 2019 16:38:07 +0000 (22:08 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 14 Oct 2019 16:38:07 +0000 (22:08 +0530)
src/nnn.c

index 093cc37e9e52b0c05c4571345e6cc8bcbc004f4f..5f1f5651d100ab096fbb6a12076baa3f8042d052 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -381,6 +381,9 @@ static char * const utils[] = {
 #ifdef __linux__
 static char cp[] = "cpg -giRp";
 static char mv[] = "mvg -gi";
+#else
+static char cp[] = "cp -iRp";
+static char mv[] = "mv -i";
 #endif
 
 /* Common strings */
@@ -1235,7 +1238,7 @@ static void cpstr(char *buf)
 #ifdef __linux__
                 "xargs -0 -a %s -%c {} %s {} .", g_selpath, REPLACE_STR, cp);
 #else
-                "cat %s | xargs -0 -o -%c {} cp -iRp {} .", g_selpath, REPLACE_STR);
+                "cat %s | xargs -0 -o -%c {} %s {} .", g_selpath, REPLACE_STR, cp);
 #endif
 }
 
@@ -1245,7 +1248,7 @@ static void mvstr(char *buf)
 #ifdef __linux__
                 "xargs -0 -a %s -%c {} %s {} .", g_selpath, REPLACE_STR, mv);
 #else
-                "cat %s | xargs -0 -o -%c {} mv -i {} .", g_selpath, REPLACE_STR);
+                "cat %s | xargs -0 -o -%c {} %s {} .", g_selpath, REPLACE_STR, mv);
 #endif
 }