From bdc66997c19b20f273d311b7e1837b298af13a30 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 3 Nov 2017 22:35:26 +0100 Subject: tweak synopsis --- README | 10 +++++----- xe.1 | 11 ++++++----- xe.c | 3 ++- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README b/README index e679830..c23f519 100644 --- a/README +++ b/README @@ -4,7 +4,8 @@ NAME xe – execute a command for every argument SYNOPSIS - xe [-0FLRnqv] [-p | -I replace-arg] [-N maxargs] [-j maxjobs] command ... + xe [-0FLRnqv] [-I replace-arg] [-N maxargs] [-j maxjobs] command ... + xe [flags ...] -p pattern command ... [+ pattern command ...]... xe [flags ...] -f argfile command ... xe [flags ...] -s shellscript xe [flags ...] -a command ... -- args ... @@ -21,9 +22,8 @@ DESCRIPTION command ... By default, arguments - separated by newlines - are read from the standard input. The resulting command is constructed from the - command line parameters, replacing replace-arg (unless -p is - used, see below) with the read argument, and is executed with - execvp(3). + command line parameters, replacing replace-arg with the read + argument, and is executed with execvp(3). In this mode, no shell is involved and replace-arg must appear as a word on its own, i.e. ‘foo {} bar’ will work, but ‘foo{} bar’ @@ -164,4 +164,4 @@ LICENSE http://creativecommons.org/publicdomain/zero/1.0/ -Void Linux July 14, 2017 Void Linux +Void Linux November 3, 2017 Void Linux diff --git a/xe.1 b/xe.1 index 9661c73..2de5b2f 100644 --- a/xe.1 +++ b/xe.1 @@ -1,4 +1,4 @@ -.Dd July 14, 2017 +.Dd November 3, 2017 .Dt XE 1 .Os .Sh NAME @@ -7,12 +7,16 @@ .Sh SYNOPSIS .Nm .Op Fl 0FLRnqv -.Oo Fl p | Fl I Ar replace-arg Oc +.Oo Fl I Ar replace-arg Oc .Op Fl N Ar maxargs .Op Fl j Ar maxjobs .Ar command\ ... .Nm .Op Ar flags\ ... +.Fl p Ar pattern Ar command\ ... +.Oo Cm \&+ Ar pattern Ar command\ ... Oc Ns ... +.Nm +.Op Ar flags\ ... .Fl f Ar argfile Ar command\ ... .Nm .Op Ar flags\ ... @@ -45,9 +49,6 @@ are read from the standard input. The resulting command is constructed from the command line parameters, replacing .Ar replace-arg -(unless -.Fl p -is used, see below) with the read argument, and is executed with .Xr execvp 3 . .Pp diff --git a/xe.c b/xe.c index 12f98fb..df8f50d 100644 --- a/xe.c +++ b/xe.c @@ -615,7 +615,8 @@ main(int argc, char *argv[], char *envp[]) case 'v': vflag++; break; default: fprintf(stderr, - "Usage: %s [-0FLRnqv] [-p | -I arg] [-N maxargs] [-j maxjobs] COMMAND...\n" + "Usage: %s [-0FLRnqv] [-I arg] [-N maxargs] [-j maxjobs] COMMAND...\n" + " | -p PATTERN COMMAND... [+ PATTERN COMMAND...]...\n" " | -f ARGFILE COMMAND...\n" " | -s SHELLSCRIPT\n" " | -a COMMAND... -- ARGS...\n" -- cgit 1.4.1