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.

+

+ (The forstdin command is a small exception: +by default, it only recognizes newlines as delimiters.) +

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: