summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-07-25 06:37:27 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-07-25 06:37:27 -0700
commitd77c03faa5783b77b4973015f485086567ba09f3 (patch)
treeb15f19b70e2ee148f5eb9efc30ef0ae655f12ec3 /txr.1
parent927b6a7c26fe7a9d0a7bf4dbdefcb5f77fe4e7d6 (diff)
downloadtxr-d77c03faa5783b77b4973015f485086567ba09f3.tar.gz
txr-d77c03faa5783b77b4973015f485086567ba09f3.tar.bz2
txr-d77c03faa5783b77b4973015f485086567ba09f3.zip
* txr.1: Corrections in "status and error reporting"
section and notes on regular expressions.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.133
1 files changed, 20 insertions, 13 deletions
diff --git a/txr.1 b/txr.1
index 15d91704..86421355 100644
--- a/txr.1
+++ b/txr.1
@@ -248,25 +248,32 @@ but has run out of files to process, the match fails.
sends errors and verbose logs to the standard error device. The following
paragraphs apply when
.B TXR
-is run without enabling verbose mode. If verbose mode is enabled, then
-.B TXR
-issues diagnostics on the standard error device even in situations which are
-not erroneous.
+is run without enabling verbose mode with -v, or the printing of variable
+bindings with -B or -a.
If the command line arguments are incorrect, or the query has a malformed
-syntax, or fails to match,
+syntax,
.B TXR
issues an error diagnostic and terminates with a failed status.
+If the query fails due to a mismatch,
+.B TXR
+terminates with a failed status. No diagnostics are issued.
+
If the query is well-formed, and matches, then
.B TXR
-issues no diagnostics on standard error (except in the case of verbose
-reporting enabled by -v). If no variables were bound in the query, then
-nothing is printed on standard output. If the query has matched one or more
-variables, then these variables are printed on standard output, in the form of
-a shell script which, when evaluated, will cause shell variables to be
-assigned. Printing of these variables is suppressed if the query executed one
-or more @(output) directive directed to standard output.
+issues no diagnostics, and terminates with a successful status.
+
+In verbose mode (-v),
+.B TXR
+issues diagnostics on the standard error device even in situations which are
+not erroneous.
+
+In bindings-printing mode (-B or -a),
+.B TXR
+prints the word "false" if the query fails, and exits with a failed
+termination status. If the query succeeds, the variable bindings, if any,
+are output on standard output.
.SH BASIC QUERY SYNTAX AND SEMANTICS
@@ -15922,5 +15929,5 @@ does not contain a. The change in behavior of the % operator upon modifying the
trailing context is not as intuitive as that of the * operator, because the
trailing context is deeply involved in its logic. For single-character
trailing contexts, it may be a good idea to use a complemented character class
-instead. That is to say, rather than (.%a)bc, consider [^a]*bc. The set of
+instead. That is to say, rather than (.%a)bc, consider [^a]*abc. The set of
strings which don't contain the character a is adequately expressed by [^a]*.