From 19f16d98258b8d94147ab0d9885069fa8a089cec Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 30 Oct 2022 13:37:16 -0500 Subject: [PATCH] Various --longopts Antoni Villalonga says are used in package builds. --- toys/lsb/gzip.c | 2 +- toys/posix/cp.c | 4 ++-- toys/posix/file.c | 2 +- toys/posix/grep.c | 2 +- toys/posix/rm.c | 2 +- toys/posix/xargs.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/toys/lsb/gzip.c b/toys/lsb/gzip.c index 049285af..d519553a 100644 --- a/toys/lsb/gzip.c +++ b/toys/lsb/gzip.c @@ -8,7 +8,7 @@ * todo: qtv --rsyncable // gzip.net version allows all options for all commands. -USE_GZIP(NEWTOY(gzip, "ncdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN)) +USE_GZIP(NEWTOY(gzip, "n(no-name)cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN)) USE_GUNZIP(NEWTOY(gunzip, "cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN)) USE_ZCAT(NEWTOY(zcat, "cdfk123456789[-123456789]", TOYFLAG_USR|TOYFLAG_BIN)) diff --git a/toys/posix/cp.c b/toys/posix/cp.c index a7359821..6a65b7fe 100644 --- a/toys/posix/cp.c +++ b/toys/posix/cp.c @@ -16,8 +16,8 @@ // for FLAG macros to work out right in shared infrastructure. USE_CP(NEWTOY(cp, "<1(preserve):;D(parents)RHLPprudaslvnF(remove-destination)fit:T[-HLPd][-niu][+Rr]", TOYFLAG_BIN)) -USE_MV(NEWTOY(mv, "<1vnF(remove-destination)fit:T[-ni]", TOYFLAG_BIN)) -USE_INSTALL(NEWTOY(install, "<1cdDpsvt:m:o:g:", TOYFLAG_USR|TOYFLAG_BIN)) +USE_MV(NEWTOY(mv, "<1v(verbose)nF(remove-destination)fit:T[-ni]", TOYFLAG_BIN)) +USE_INSTALL(NEWTOY(install, "<1cdDp(preserve-timestamps)svt:m:o:g:", TOYFLAG_USR|TOYFLAG_BIN)) config CP bool "cp" diff --git a/toys/posix/file.c b/toys/posix/file.c index e502baed..e7b989b9 100644 --- a/toys/posix/file.c +++ b/toys/posix/file.c @@ -4,7 +4,7 @@ * * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/file.html -USE_FILE(NEWTOY(file, "<1bhLs[!hL]", TOYFLAG_USR|TOYFLAG_BIN)) +USE_FILE(NEWTOY(file, "<1b(brief)hLs[!hL]", TOYFLAG_USR|TOYFLAG_BIN)) config FILE bool "file" diff --git a/toys/posix/grep.c b/toys/posix/grep.c index fa1f9500..9b2e583c 100644 --- a/toys/posix/grep.c +++ b/toys/posix/grep.c @@ -7,7 +7,7 @@ * Posix doesn't even specify -r: too many deviations to document. * TODO: -i is only ascii case insensitive, not unicode. -USE_GREP(NEWTOY(grep, "(line-buffered)(color):;(exclude-dir)*S(exclude)*M(include)*ZzEFHIab(byte-offset)h(no-filename)ino(only-matching)rRsvwcL(files-without-match)l(files-with-matches)q(quiet)(silent)e*f*C#B#A#m#x[!wx][!EF]", TOYFLAG_BIN|TOYFLAG_ARGFAIL(2)|TOYFLAG_LINEBUF)) +USE_GREP(NEWTOY(grep, "(line-buffered)(color):;(exclude-dir)*S(exclude)*M(include)*ZzEFHIab(byte-offset)h(no-filename)ino(only-matching)rRsvwc(count)L(files-without-match)l(files-with-matches)q(quiet)(silent)e*f*C#B#A#m#x[!wx][!EF]", TOYFLAG_BIN|TOYFLAG_ARGFAIL(2)|TOYFLAG_LINEBUF)) USE_EGREP(OLDTOY(egrep, grep, TOYFLAG_BIN|TOYFLAG_ARGFAIL(2)|TOYFLAG_LINEBUF)) USE_FGREP(OLDTOY(fgrep, grep, TOYFLAG_BIN|TOYFLAG_ARGFAIL(2)|TOYFLAG_LINEBUF)) diff --git a/toys/posix/rm.c b/toys/posix/rm.c index be611e67..cfe282f7 100644 --- a/toys/posix/rm.c +++ b/toys/posix/rm.c @@ -4,7 +4,7 @@ * * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html -USE_RM(NEWTOY(rm, "fiRrv[-fi]", TOYFLAG_BIN)) +USE_RM(NEWTOY(rm, "f(force)iRrv[-fi]", TOYFLAG_BIN)) config RM bool "rm" diff --git a/toys/posix/xargs.c b/toys/posix/xargs.c index dfcb49cc..67fa3a05 100644 --- a/toys/posix/xargs.c +++ b/toys/posix/xargs.c @@ -9,7 +9,7 @@ * TODO: -L Max number of lines of input per command * TODO: -x Exit if can't fit everything in one command -USE_XARGS(NEWTOY(xargs, "^E:P#<0=1optrn#<1(max-args)s#0[!0E]", TOYFLAG_USR|TOYFLAG_BIN)) +USE_XARGS(NEWTOY(xargs, "^E:P#<0(null)=1optr(no-run-if-empty)n#<1(max-args)s#0[!0E]", TOYFLAG_USR|TOYFLAG_BIN)) config XARGS bool "xargs" -- 2.39.2