aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-01-02 19:24:03 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-01-02 19:24:03 +0200
commitc44f0f83448b426935e9aeb07c5d761299144d14 (patch)
tree696d15a11587c94e3a5f8b356f3f91adc73c789a /doc
parent1b0a4de9fa73dd2453cbd2902c2cd4d000f4abe7 (diff)
downloadwydawca-c44f0f83448b426935e9aeb07c5d761299144d14.tar.gz
wydawca-c44f0f83448b426935e9aeb07c5d761299144d14.tar.bz2
$- construct (similar to m4's dnl).
* src/meta.c: Special construct $- removes the character immediately following it. * doc/wydawca.texi: Document the use of $- construct. * src/triplet.c (expand_triplet_ls_full) (expand_triplet_ls_upload): Keep trailing newline in the expansion. * tests/etc/notify.rc: Update.
Diffstat (limited to 'doc')
-rw-r--r--doc/wydawca.texi25
1 files changed, 21 insertions, 4 deletions
diff --git a/doc/wydawca.texi b/doc/wydawca.texi
index 88c2e6c..e9e63be 100644
--- a/doc/wydawca.texi
+++ b/doc/wydawca.texi
@@ -684,6 +684,8 @@ example above:
@end smallexample
@anchor{meta-interpretation}
+@cindex meta-interpretation
+@cindex meta-variables
Depending on the context, the contents of a quoted string may be
subject to @dfn{meta-variable interpretation}. During this process,
any sequence
@@ -715,6 +717,13 @@ equivalent.
If @var{var} is not defined, the meta-reference is left unchanged.
+The special sequence @samp{$-} causes removal of it and any character
+following it. Most often it is used as a next-to-last character
+on a line, right before the newline. In this position it causes the
+removal of the trailing newline, similar to @samp{dnl} in @command{m4}.
+@xref{listings, Triplet Listings}, for a detailed description and
+examples of @samp{$-} use.
+
To insert a literal @samp{$} character in a string that is subject to
meta-variable interpretation, duplicate it: @samp{$$}.
@@ -2631,8 +2640,11 @@ processing this spool.
processing this spool.
@end multitable
+@anchor{listings}
+@cindex listing, triplet
+@cindex triplet listing
@dfn{Listings} referred to in the table above, are similar to those
-produced by @code{ls} command, and include information
+produced by the @code{ls} command, and include information
on file permissions, ownership, size and modification date. For
example, here is a possible @code{$@{triplet:ls:full@}} listing:
@@ -2642,9 +2654,14 @@ example, here is a possible @code{$@{triplet:ls:full@}} listing:
-rw-r--r-- gray user 62 2007-09-06 22:14:35 tar-1.18.tar.gz.directive.asc
@end smallexample
-
The following example shows how to configure success notification
-for the user:
+for the user. Notice the use of the @samp{$-} after
+@samp{$@{triplet:ls:upload@}}: it removes the newline character after
+it and thus allows for more natural indentation of the next
+line. Without it, the expanded message would have contained two
+newlines after the full listing: one produced by
+@samp{$@{triplet:ls:upload@}} and the second one taken verbatim from
+the message template.
@smallexample
notify-event @{
@@ -2656,7 +2673,7 @@ Subject: Upload of $@{project@} successful
Upload of $@{project@} to $@{url@}/$@{dir@} finished successfully.
Files uploaded:
-$@{triplet:ls:upload@}
+$@{triplet:ls:upload@}$-
Resource usage: $@{timer:triplet:real@}/$@{timer:wydawca:real@}r \
$@{timer:triplet:user@}/$@{timer:wydawca:user@}u \

Return to:

Send suggestions and report system problems to the System administrator.