mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 08:32:36 +00:00
commit
c87b67e073
|
@ -202,12 +202,14 @@
|
|||
#define CTX_MAX 8
|
||||
#endif
|
||||
|
||||
#ifndef SED
|
||||
/* BSDs or Solaris or SunOS */
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(sun) || defined(__sun)
|
||||
#define SED "gsed"
|
||||
#else
|
||||
#define SED "sed"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Large selection threshold */
|
||||
#ifndef LARGESEL
|
||||
|
@ -2729,12 +2731,7 @@ static void archive_selection(const char *cmd, const char *archive, const char *
|
|||
}
|
||||
|
||||
snprintf(buf, CMD_LEN_MAX,
|
||||
#ifdef __linux__
|
||||
SED" -ze 's|^%s/||' '%s' | xargs -0 %s %s", curpath, selpath, cmd, archive
|
||||
#else
|
||||
"tr '\\0' '\n' < '%s' | "SED" -e 's|^%s/||' | tr '\n' '\\0' | xargs -0 %s %s",
|
||||
selpath, curpath, cmd, archive
|
||||
#endif
|
||||
);
|
||||
spawn(utils[UTIL_SH_EXEC], buf, NULL, NULL, F_CLI | F_CONFIRM);
|
||||
free(buf);
|
||||
|
|
Loading…
Reference in a new issue