pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/doc/guide/files doc/guide: explain single...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c90c469ce810
branches:  trunk
changeset: 308262:c90c469ce810
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat May 19 10:30:22 2018 +0000

description:
doc/guide: explain single quotes in "Echoing a string exactly as-is"

See https://mail-index.netbsd.org/pkgsrc-users/2018/05/11/msg026698.html

diffstat:

 doc/guide/files/makefile.xml |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 68f752f23a98 -r c90c469ce810 doc/guide/files/makefile.xml
--- a/doc/guide/files/makefile.xml      Sat May 19 10:11:31 2018 +0000
+++ b/doc/guide/files/makefile.xml      Sat May 19 10:30:22 2018 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: makefile.xml,v 1.28 2018/05/11 21:58:50 leot Exp $ -->
+<!-- $NetBSD: makefile.xml,v 1.29 2018/05/19 10:30:22 rillig Exp $ -->
 
 <chapter id="makefile"> <?dbhtml filename="makefile.html"?>
   <title>Programming in <filename>Makefile</filename>s</title>
@@ -188,7 +188,11 @@
 leading dash or those containing backslashes.</para>
 
 <para>Example 3 can handle arbitrary strings, since &man.printf.1; only
-interprets the format string, but not the next argument.</para>
+interprets the format string, but not the next argument. The trailing
+single quotes handle the case when the string is empty. In that case, the
+:Q modifier would result in an empty string too, which would then be
+skipped by the shell. For &man.printf.1; this doesn't make a difference,
+but other programs may care.</para>
 
 <para>In example 4, the <varname>EXAMPLE_ENV</varname> does not
 need to be quoted because the quoting has already been done



Home | Main Index | Thread Index | Old Index