From 49b387bb53e76eecd2b6cf4f89f3146fc2198bd3 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Tue, 24 Nov 2020 17:56:57 +0000
Subject: Fix chomping: only make it default on line-processing binaries
---
doc/el_transform.html | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
(limited to 'doc/el_transform.html')
diff --git a/doc/el_transform.html b/doc/el_transform.html
index cb163a8..e15ec69 100644
--- a/doc/el_transform.html
+++ b/doc/el_transform.html
@@ -41,6 +41,10 @@ is used, which means that the default delimiters are spaces, newlines,
carriage returns and tabs.
+
Crunching
@@ -53,6 +57,8 @@ three consecutive spaces, or a space and 4 tab characters, with a
single space. This is called crunching, and it is done
by giving the -C switch to the substitution command. The
remaining delimiter will always be the first in the sequence.
+Chomping is off by default, or if you give the -c
+switch.
@@ -66,8 +72,10 @@ remaining delimiter will always be the first in the sequence.
Sometimes you don't want the last delimiter in a value.
Chomping deletes the last character of a value if it is a
-delimiter. It can be requested by giving the -n switch to the
-substitution command. Note that chomping always happens after
+delimiter. It is requested by giving the -n switch to the
+substitution command. You can turn it off by giving the -N
+switch. It is off by default unless mentioned in the documentation
+page of specific binaries. Note that chomping always happens after
crunching, which means you can use crunching+chomping to ignore, for
instance, a set of trailing spaces.
@@ -112,11 +120,11 @@ several advantages over the shell's:
- - Splitting has to be explicitly requested, by specifying the
--s option to commands that perform
-substitution. By default,
-substitutions are performed as is, without interpreting the
-characters in the value.
+ - Splitting is off by default, which means that substitutions
+are performed as is, without interpreting the characters in the
+value. In execline, splitting has to be explicitly requested
+by specifying the -s option to commands that perform
+substitution.
- Positional parameters are never split, so that execline
scripts can handle arguments the way the user intended to. To
split $1, for instance, you have to ask for it
--
cgit v1.3.1