From 08bcf6449cc0ca37b2223eb8e204eaf5a52fb348 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 10 Dec 2021 15:52:00 -0500 Subject: [PATCH] Clarify docs around @filename and leading/trailing space --- manual/qpdf-manual.xml | 14 ++++++++------ qpdf/qpdf.cc | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/manual/qpdf-manual.xml b/manual/qpdf-manual.xml index 42b1d25c..8c133bce 100644 --- a/manual/qpdf-manual.xml +++ b/manual/qpdf-manual.xml @@ -573,12 +573,14 @@ make If appears as a word anywhere in the command-line, it will be read line by line, and each line will be - treated as a command-line argument. The option - allows arguments to be read from standard input. This allows qpdf - to be invoked with an arbitrary number of arbitrarily long - arguments. It is also very useful for avoiding having to pass - passwords on the command line. Note that the - can't appear in the middle of an + treated as a command-line argument. Leading and trailing + whitespace is intentionally not removed from lines, which makes it + possible to handle arguments that start or end with spaces. The + option allows arguments to be read from + standard input. This allows qpdf to be invoked with an arbitrary + number of arbitrarily long arguments. It is also very useful for + avoiding having to pass passwords on the command line. Note that + the can't appear in the middle of an argument, so constructs such as will not work. You would have to include the argument and its options together in the arguments file. diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc index c336455b..c363c087 100644 --- a/qpdf/qpdf.cc +++ b/qpdf/qpdf.cc @@ -1340,7 +1340,8 @@ ArgParser::argHelp() << "\n" << "If @filename appears anywhere in the command-line, each line of filename\n" << "will be interpreted as an argument. No interpolation is done. Line\n" - << "terminators are stripped. @- can be specified to read from standard input.\n" + << "terminators are stripped, but leading and trailing whitespace is\n" + << "intentionally preserved. @- can be specified to read from standard input.\n" << "\n" << "The output file can be - to indicate writing to standard output, or it can\n" << "be --replace-input to cause qpdf to replace the input file with the output.\n"