nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit c87b67e07328ecfe18d3dc727d572bf0d1927ae0
parent 8ec2fe7f813e6a2d54f2b4083dc4b231fef1ae7b
Author: Arun <engineerarun@gmail.com>
Date:   Wed, 24 Nov 2021 18:25:13 +0530

Merge pull request #1243 from omar-polo/sed-misc

misc sed tweaks
Diffstat:
Msrc/nnn.c | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -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);