mirror of
https://github.com/jarun/nnn.git
synced 2024-11-20 01:49:14 +00:00
Merge pull request #313 from 0xACE/relativearchives
Make selection based archives use relative paths
This commit is contained in:
commit
199fb3ca29
|
@ -1300,7 +1300,10 @@ 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);
|
||||
#elif defined __APPLE__
|
||||
"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
|
||||
|
|
Loading…
Reference in a new issue