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