diff options
author | 0xACE <0xaced@gmail.com> | 2019-08-04 00:41:20 +0200 |
---|---|---|
committer | 0xACE <0xaced@gmail.com> | 2019-08-04 00:41:20 +0200 |
commit | 30651d16d7ff26e5b71cb7c53d0409516e766470 (patch) | |
tree | 426eb464548e620e667891de752a2e5e4d137a72 /src/nnn.c | |
parent | 9d4498e7b30b5421fffee4aa13740b0a27c743d5 (diff) | |
download | nnn-30651d16d7ff26e5b71cb7c53d0409516e766470.tar.gz |
Make selection based archives use relative paths
This will create archives relative to your current working directory
rather than a full path when when creating the archive based on your
current selection.
Diffstat (limited to 'src/nnn.c')
-rw-r--r-- | src/nnn.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1302,7 +1302,7 @@ static void archive_selection(const char *cmd, const char *archive, const char * char *buf = (char *)malloc(CMD_LEN_MAX * sizeof(char)); snprintf(buf, CMD_LEN_MAX, #ifdef __linux__ - "xargs -0 -a %s %s %s", g_cppath, cmd, archive); + "sed -ze 's|^%s/||' '%s' | xargs -0 %s %s", curpath, g_cppath, cmd, archive); #else "cat %s | xargs -0 -o %s %s", g_cppath, cmd, archive); #endif |