diff options
| author | 2018-11-27 22:37:06 +0530 | |
|---|---|---|
| committer | 2018-11-27 22:37:06 +0530 | |
| commit | 0a21d90ad5c8e5cc4eb52a454b7aa32e642c431d (patch) | |
| tree | 627865aa6ff120dfd8aeaa6f3c92a0b3fe2915a7 /src | |
| parent | 70d371c214ba3c0913b40064745e73510e33be57 (diff) | |
| download | nnn-0a21d90ad5c8e5cc4eb52a454b7aa32e642c431d.tar.gz | |
Fix #143: support copy to clipboard
Diffstat (limited to 'src')
| -rw-r--r-- | src/nnn.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3008,7 +3008,7 @@ nochange: writecp(newpath, r - 1); /* Truncate NULL from end */ if (copier) - spawn(copier, newpath, NULL, NULL, F_NOTRACE); + spawn(copier, NULL, NULL, NULL, F_NOTRACE); } printmsg(newpath); goto nochange; @@ -3047,7 +3047,7 @@ nochange: if (copybufpos) { /* File path(s) written to the buffer */ writecp(pcopybuf, copybufpos - 1); /* Truncate NULL from end */ if (copier) - spawn(copier, pcopybuf, NULL, NULL, F_NOTRACE); + spawn(copier, NULL, NULL, NULL, F_NOTRACE); if (ncp) { /* Some files cherry picked */ snprintf(newpath, PATH_MAX, "%d files copied", ncp); @@ -3085,11 +3085,11 @@ nochange: } if (sel == SEL_CP) - snprintf(g_buf, MAX_CMD_LEN, "cat %s | xargs -0 cp -ir --preserve=all -t .", g_cppath); + snprintf(g_buf, MAX_CMD_LEN, "xargs -0 -a %s cp -ir --preserve=all -t .", g_cppath); else if (sel == SEL_MV) - snprintf(g_buf, MAX_CMD_LEN, "cat %s | xargs -0 mv -i -t .", g_cppath); + snprintf(g_buf, MAX_CMD_LEN, "xargs -0 -a %s mv -i -t .", g_cppath); else /* SEL_RMMUL */ - snprintf(g_buf, MAX_CMD_LEN, "cat %s | xargs -0 rm -Ir", g_cppath); + snprintf(g_buf, MAX_CMD_LEN, "xargs -0 -a %s rm -Ir", g_cppath); spawn("sh", "-c", g_buf, path, F_NORMAL | F_SIGINT); |