From 45aae495cbc78d54c70ccdedd319fa807cda9776 Mon Sep 17 00:00:00 2001 From: Alexandre Jasmin Date: Fri, 3 Feb 2017 19:36:28 -0500 Subject: [PATCH] doc: rework BRE/ERE table to fit PDF manual Sample code in the basic/extended table was too wide to fit on a Letter size printout. Text was overlapping and unreadable. Remove margin, split commands in two lines and change the column with. * doc/sed.texi (Basic and extended regexp): Rework table. --- doc/sed.texi | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/doc/sed.texi b/doc/sed.texi index 4a14470..95497ba 100644 --- a/doc/sed.texi +++ b/doc/sed.texi @@ -2460,7 +2460,7 @@ unless prefixed backslash (@samp{\}); While with extended (ERE) syntax it is reversed: these characters are special unless they are prefixed with backslash (@samp{\}). -@multitable @columnfractions .33 .33 .33 +@multitable @columnfractions .28 .36 .35 @headitem Desired pattern @tab Basic (BRE) Syntax @@ -2469,32 +2469,56 @@ with backslash (@samp{\}). @item literal @samp{+} (plus sign) @tab +@exampleindent 0 +@codequoteundirected on +@codequotebacktick on @example -$ echo "a+b=c" | sed -n '/a+b/p' +$ echo 'a+b=c' > foo +$ sed -n '/a+b/p' foo a+b=c @end example +@codequotebacktick off +@codequoteundirected off @tab +@exampleindent 0 +@codequoteundirected on +@codequotebacktick on @example -$ echo "a+b=c" | sed -E -n '/a\+b/p' +$ echo 'a+b=c' > foo +$ sed -E -n '/a\+b/p' foo a+b=c @end example +@codequotebacktick off +@codequoteundirected off @item One or more @samp{a} characters followed by @samp{b} (plus sign as special meta-character) @tab +@exampleindent 0 +@codequoteundirected on +@codequotebacktick on @example -$ echo "aab" | sed -n '/a\+b/p' +$ echo aab > foo +$ sed -n '/a\+b/p' foo aab @end example +@codequotebacktick off +@codequoteundirected off @tab +@exampleindent 0 +@codequoteundirected on +@codequotebacktick on @example -$ echo "aab" | sed -E -n '/a+b/p' +$ echo aab > foo +$ sed -E -n '/a+b/p' foo aab @end example +@codequotebacktick off +@codequoteundirected off @end multitable