annotate ed.1 @ 0:1493bea5ac22 0.1

Initial version of the standalone heirloom-ed
author markus schnalke <meillo@marmaro.de>
date Mon, 05 Sep 2011 16:31:35 +0200
parents
children a09d0630f05b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
1 '\" t
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
2 .\" Sccsid @(#)ed.1 1.48 (gritter) 6/22/05
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
3 .\" Parts taken from ed(1), Unix 7th edition:
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
4 .\" Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
5 .\"
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
6 .\" Redistribution and use in source and binary forms, with or without
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
7 .\" modification, are permitted provided that the following conditions
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
8 .\" are met:
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
9 .\" Redistributions of source code and documentation must retain the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
10 .\" above copyright notice, this list of conditions and the following
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
11 .\" disclaimer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
12 .\" Redistributions in binary form must reproduce the above copyright
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
13 .\" notice, this list of conditions and the following disclaimer in the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
14 .\" documentation and/or other materials provided with the distribution.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
15 .\" All advertising materials mentioning features or use of this software
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
16 .\" must display the following acknowledgement:
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
17 .\" This product includes software developed or owned by Caldera
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
18 .\" International, Inc.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
19 .\" Neither the name of Caldera International, Inc. nor the names of
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
20 .\" other contributors may be used to endorse or promote products
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
21 .\" derived from this software without specific prior written permission.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
22 .\"
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
23 .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
24 .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
25 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
26 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
27 .\" ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
28 .\" LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
29 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
30 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
31 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
32 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
33 .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
34 .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
35 .TH ED 1 "6/22/05" "Heirloom Toolchest" "User Commands"
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
36 .if t .ds q \(aa
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
37 .if n .ds q '
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
38 .SH NAME
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
39 ed \- text editor
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
40 .SH SYNOPSIS
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
41 \fBed\fR [\fB\-\fR\ |\ \fB\-s\fR] [\fB\-p\fI\ prompt\fR] [\fIname\fR]
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
42 .SH DESCRIPTION
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
43 .I Ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
44 is the standard text editor.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
45 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
46 If a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
47 .I name
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
48 argument is given,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
49 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
50 simulates an
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
51 .I e
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
52 command (see below)\| on the named file; that is to say,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
53 the file is read into
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
54 .IR ed 's
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
55 buffer so that it can be edited.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
56 The optional
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
57 .B \-
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
58 or
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
59 .B \-s
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
60 suppresses the printing
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
61 of character counts by
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
62 .IR e ,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
63 .IR r ,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
64 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
65 .I w
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
66 commands,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
67 and of the `!' after completion of a shell command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
68 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
69 With the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
70 .B \-p
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
71 option,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
72 the given
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
73 .I prompt
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
74 string is printed before each command is read.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
75 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
76 .I Ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
77 operates on a copy of any file it is editing; changes made
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
78 in the copy have no effect on the file until a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
79 .IR w ""
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
80 (write)\|
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
81 command is given.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
82 The copy of the text being edited resides
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
83 in a temporary file called the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
84 .IR buffer .
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
85 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
86 The editor supports format specifications as defined in
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
87 .IR fspec (5).
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
88 If the terminal is configured to expand tabulators
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
89 (as enabled with
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
90 .I stty tab3
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
91 or
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
92 .IR "stty \-tabs"),
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
93 and the first line of the file being edited
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
94 contains a format specification,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
95 the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
96 .I t
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
97 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
98 .I s
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
99 are interpreted,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
100 that is, tabulators are expanded and lines are truncated
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
101 when printing to the terminal. For example,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
102 .RS
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
103 <:t\-f s72:>
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
104 .sp
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
105 .RE
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
106 selects FORTRAN format and truncates lines at 72 characters.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
107 No expansion or truncation is performed by
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
108 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
109 when input is typed to the terminal.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
110 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
111 Commands to
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
112 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
113 have a simple and regular structure: zero or
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
114 more
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
115 .I addresses
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
116 followed by a single character
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
117 .I command,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
118 possibly
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
119 followed by parameters to the command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
120 These addresses specify one or more lines in the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
121 Missing addresses are supplied by default.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
122 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
123 In general, only one command may appear on a line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
124 Certain commands allow the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
125 addition of text to the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
126 While
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
127 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
128 is accepting text, it is said
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
129 to be in
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
130 .I "input mode."
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
131 In this mode, no commands are recognized;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
132 all input is merely collected.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
133 Input mode is left by typing a period `\fB.\fR' alone at the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
134 beginning of a line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
135 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
136 .I Ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
137 supports a limited form of
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
138 .I "regular expression"
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
139 notation.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
140 A regular expression specifies
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
141 a set of strings of characters.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
142 A member of this set of strings is said to be
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
143 .I matched
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
144 by the regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
145 In the following specification for regular expressions
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
146 the word `character' means any character but newline.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
147 .B ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
148 uses simple regular expressions.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
149 .SS "Simple Regular Expressions"
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
150 .IP 1.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
151 Any character except a special character
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
152 matches itself.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
153 Special characters are
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
154 the regular expression delimiter plus
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
155 .RB \e\|[\| .
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
156 and sometimes ^\|*\|$.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
157 .IP 2.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
158 A
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
159 .B .\&
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
160 matches any character.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
161 .IP 3.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
162 A \fB\e\fR followed by any character except a digit
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
163 or (\|) {\|} <\|> matches that character.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
164 .IP 4.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
165 A nonempty string
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
166 .I s
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
167 bracketed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
168 \fB[\fI\|s\|\fB]\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
169 (or
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
170 \fB[^\fIs\|\fB]\fR)
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
171 forms a \fIbracket expression\fR that
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
172 matches any character in (or not in)
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
173 .I s.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
174 In
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
175 .I s,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
176 \e has no special meaning, and ] may only appear as
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
177 the first letter.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
178 A substring
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
179 \fIa\fB\-\fIb\fR,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
180 with
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
181 .I a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
182 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
183 .I b
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
184 in ascending ASCII order, stands for the inclusive
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
185 range of ASCII characters.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
186 .IP 5.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
187 A regular expression of form 1-4 followed by \fB*\fR matches a sequence of
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
188 0 or more matches of the regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
189 .IP 6.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
190 A regular expression of form 1-4
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
191 followed by \fB\e{\fIm\fB,\fIn\fB\e}\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
192 forms an \fIinterval expression\fR that
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
193 matches a sequence of \fIm\fR through \fIn\fR matches, inclusive,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
194 of the regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
195 The values of \fIm\fR and \fIn\fR must be non-negative
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
196 and smaller than 256.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
197 The form \fB\e{\fIm\fB\e}\fR matches exactly \fIm\fR occurrences,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
198 \fB\e{\fIm\fB,\e}\fR matches at least \fIm\fR occurrences.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
199 .IP 7.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
200 The sequence \fB\e<\fR forces the match
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
201 to occur only at the beginning of a ``variable'' or ``word'';
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
202 that is, either at the beginning of a line,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
203 or just before a letter, digit or underline
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
204 and after a character not one of these.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
205 .IP 8.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
206 The sequence \fB\e>\fR matches the end
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
207 of a ``variable'' or ``word'',
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
208 i.\|e. either the end of the line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
209 or before character which is neither a letter,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
210 nor a digit, nor the underline character.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
211 .IP 9.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
212 A regular expression,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
213 .I x,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
214 of form 1-11, parenthesized
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
215 \fB\e(\fI\|x\|\fB\e)\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
216 is called a \fIsubexpression\fR and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
217 matches what
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
218 .I x
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
219 matches.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
220 .IP 10.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
221 A \fB\e\fR followed by a digit
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
222 .I n
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
223 forms a \fIbackreference\fR and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
224 matches a copy of the string that the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
225 parenthesized regular expression beginning with the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
226 .IR n th
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
227 \e( matched.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
228 .IP 11.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
229 A regular expression of form 1-11,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
230 .I x,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
231 followed by a regular expression of form 1-10,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
232 .I y
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
233 matches a match for
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
234 .I x
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
235 followed by a match for
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
236 .I y,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
237 with the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
238 .I x
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
239 match being as long as possible while still permitting a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
240 .I y
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
241 match.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
242 .IP 12.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
243 A regular expression of form 1-11 preceded by \fB^\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
244 (or followed by \fB$\fR), is constrained to matches that
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
245 begin at the left (or end at the right) end of a line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
246 (\fIanchoring\fR).
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
247 .IP 13.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
248 A regular expression of form 1-12 picks out the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
249 longest among the leftmost matches in a line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
250 .IP 14.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
251 An empty regular expression stands for a copy of the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
252 last regular expression encountered.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
253 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
254 Regular expressions are used in addresses to specify
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
255 lines and in one command
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
256 (see
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
257 .I s
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
258 below)\|
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
259 to specify a portion of a line which is to be replaced.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
260 If it is desired to use one of
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
261 the regular expression metacharacters as an ordinary
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
262 character, that character may be preceded by `\e'.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
263 This also applies to the character bounding the regular
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
264 expression (often `/')\| and to `\e' itself.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
265 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
266 To understand addressing in
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
267 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
268 it is necessary to know that at any time there is a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
269 .I "current line."
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
270 Generally speaking, the current line is
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
271 the last line affected by a command; however,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
272 the exact effect on the current line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
273 is discussed under the description of
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
274 the command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
275 Addresses are constructed as follows.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
276 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
277 1.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
278 The character `\fB.\fR' addresses the current line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
279 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
280 2.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
281 The character `\fB$\fR' addresses the last line of the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
282 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
283 3.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
284 A decimal number
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
285 .I n
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
286 addresses the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
287 .IR n -th
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
288 line of the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
289 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
290 4.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
291 `\fB\(fm\fIx\fR' addresses the line marked with the name
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
292 .IR x ,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
293 which must be a lower-case letter.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
294 Lines are marked with the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
295 .I k
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
296 command described below.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
297 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
298 5.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
299 A regular expression enclosed in slashes `\fB/\fR' addresses
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
300 the line found by searching forward from the current line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
301 and stopping at the first line containing a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
302 string that matches the regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
303 If necessary the search wraps around to the beginning of the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
304 buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
305 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
306 6.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
307 A regular expression enclosed in queries `\fB?\fR' addresses
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
308 the line found by searching backward from the current line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
309 and stopping at the first line containing
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
310 a string that matches the regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
311 If necessary
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
312 the search wraps around to the end of the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
313 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
314 7.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
315 An address followed by a plus sign `\fB+\fR'
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
316 or a minus sign `\fB\-\fR' followed by a decimal number
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
317 specifies that address plus
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
318 (resp. minus)\| the indicated number of lines.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
319 The plus sign may be omitted.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
320 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
321 8.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
322 If an address begins with `\fB+\fR' or `\fB\-\fR'
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
323 the addition or subtraction is taken with respect to the current line;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
324 e.g. `\-5' is understood to mean `\fB.\fR\-5'.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
325 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
326 9.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
327 If an address ends with `\fB+\fR' or `\fB\-\fR',
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
328 then 1 is added (resp. subtracted).
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
329 As a consequence of this rule and rule 8,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
330 the address `\-' refers to the line before the current line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
331 Moreover,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
332 trailing
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
333 `+' and `\-' characters
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
334 have cumulative effect, so `\-\-' refers to the current
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
335 line less 2.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
336 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
337 10.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
338 To maintain compatibility with earlier versions of the editor,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
339 the character `\fB^\fR' in addresses is
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
340 equivalent to `\-'.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
341 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
342 Commands may require zero, one, or two addresses.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
343 Commands which require no addresses regard the presence
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
344 of an address as an error.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
345 Commands which accept one or two addresses
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
346 assume default addresses when insufficient are given.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
347 If more addresses are given than such a command requires,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
348 the last one or two (depending on what is accepted)\| are used.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
349 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
350 Addresses are separated from each other typically by a comma
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
351 `\fB,\fR'.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
352 They may also be separated by a semicolon
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
353 `\fB;\fR'.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
354 In this case the current line `\fB.\fR' is set to
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
355 the previous address before the next address is interpreted.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
356 This feature can be used to determine the starting
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
357 line for forward and backward searches (`/', `?')\|.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
358 The second address of any two-address sequence
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
359 must correspond to a line following the line corresponding to the first address.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
360 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
361 Omission of the first address causes
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
362 the first line to be used with `,',
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
363 or the current line with `;', respectively;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
364 if the second address is also omitted,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
365 the last line of the buffer is used.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
366 Thus a single `,' specifies the entire contents of the buffer,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
367 and a single `;' specifies the contents
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
368 ranging from the current line to the last one.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
369 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
370 In the following list of
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
371 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
372 commands, the default addresses
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
373 are shown in parentheses.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
374 The parentheses are not part of
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
375 the address, but are used to show that the given addresses are
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
376 the default.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
377 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
378 As mentioned, it is generally illegal for more than one
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
379 command to appear on a line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
380 However, most commands may be suffixed by `p', `l', or `n',
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
381 in which case
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
382 the current line is either
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
383 printed, listed, or numbered respectively
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
384 in the way discussed below.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
385 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
386 \fR(\|\fI.\|\fR)\fB\|a\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
387 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
388 .ns
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
389 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
390 <text>
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
391 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
392 .ns
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
393 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
394 .B .
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
395 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
396 The append command reads the given text
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
397 and appends it after the addressed line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
398 `\fB.\fR' is left
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
399 on the last line input, if there
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
400 were any, otherwise at the addressed line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
401 Address `0' is legal for this command; text is placed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
402 at the beginning of the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
403 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
404 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBc\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
405 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
406 .ns
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
407 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
408 <text>
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
409 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
410 .ns
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
411 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
412 .B .
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
413 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
414 The change
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
415 command deletes the addressed lines, then accepts input
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
416 text which replaces these lines.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
417 `\fB.\fR' is left at the last line input; if there were none,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
418 it is left at the line preceding the deleted lines.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
419 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
420 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBd\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
421 The delete command deletes the addressed lines from the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
422 The line originally after the last line deleted becomes the current line;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
423 if the lines deleted were originally at the end,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
424 the new last line becomes the current line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
425 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
426 \fBe\ \fIfilename\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
427 The edit
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
428 command causes the entire contents of the buffer to be deleted,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
429 and then the named file to be read in.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
430 `\fB.\fR' is set to the last line of the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
431 The number of characters read is typed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
432 `\fIfilename\fR' is remembered for possible use as a default file name
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
433 in a subsequent
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
434 .I r
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
435 or
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
436 .I w
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
437 command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
438 If `\fIfilename\fR' is missing, the remembered name is used.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
439 A `\fIfilename\fR' starting with a `\fB!\fR'
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
440 causes the output of the shell command following this character
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
441 to be read in.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
442 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
443 \fBE\ \fIfilename\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
444 This command is the same as
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
445 .IR e ,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
446 except that no diagnostic results when no
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
447 .I w
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
448 has been given since the last buffer alteration.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
449 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
450 \fBf\ \fIfilename\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
451 The filename command prints the currently remembered file name.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
452 If `\fIfilename\fR' is given,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
453 the currently remembered file name is changed to `\fIfilename\fR'.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
454 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
455 \fR(\fI1\fB,\fI$\fR)\|\fBg/\fIregular expression\fB/\fIcommand list\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
456 In the global
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
457 command, the first step is to mark every line which matches
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
458 the given \fIregular expression\fR.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
459 Then for every such line, the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
460 given \fIcommand list\fR is executed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
461 with `\fB.\fR' initially set to that line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
462 A single command or the first of multiple commands
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
463 appears on the same line with the global command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
464 All lines of a multi-line list except the last line must be ended with `\e'.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
465 .I A,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
466 .I i,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
467 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
468 .I c
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
469 commands and associated input are permitted;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
470 the `\fB.\fR' terminating input mode may be omitted if it would be on the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
471 last line of the command list.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
472 The commands
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
473 .I g
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
474 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
475 .I v
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
476 are not permitted in the command list.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
477 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
478 \fR(\fI1\fB,\fI$\fR)\|\fBG/\fIregular expression\fB/\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
479 The interactive global command
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
480 first marks every line matching the given \fIregular expression\fR.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
481 Then each line is printed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
482 and a command is read and executed for this line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
483 A single newline character causes the line to remain unchanged,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
484 an isolated `\fB&\fR' repeats the command given for the previous line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
485 The command can be terminated by an interrupt signal.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
486 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
487 .B h
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
488 This command prints a verbose description for the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
489 last error encountered.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
490 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
491 .B H
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
492 This command acts like the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
493 .I h
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
494 command,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
495 but also causes verbose descriptions to be printed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
496 on all following error conditions.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
497 Another
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
498 .I H
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
499 turns verbose mode off.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
500 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
501 \fR(\|\fI.\|\fR)\|\fBi\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
502 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
503 .ns
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
504 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
505 <text>
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
506 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
507 .ns
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
508 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
509 .B .
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
510 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
511 This command inserts the given text before the addressed line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
512 `\fB.\fR' is left at the last line input, or, if there were none,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
513 at the line before the addressed line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
514 This command differs from the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
515 .I a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
516 command only in the placement of the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
517 text.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
518 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
519 \fR(\|\fI.\|\fB,\|\fI.+1\fR)\|\fBj\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
520 This command joins the addressed lines into a single line;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
521 intermediate newlines simply disappear.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
522 `\fB.\fR' is left at the resulting line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
523 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
524 \fR(\fI.\fR)\|\fBk\fIx\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
525 The mark command marks the addressed line with
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
526 name
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
527 .IR x ,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
528 which must be a lower-case letter.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
529 The address form `\(fm\fIx\fR' then addresses this line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
530 .ne 2.5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
531 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
532 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBl\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
533 The list command
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
534 prints the addressed lines in an unambiguous way:
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
535 non-graphic control characters are printed in three-digit octal;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
536 Long lines are folded.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
537 The
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
538 .I l
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
539 command may be placed on the same line after any non-i/o
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
540 command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
541 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
542 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBm\fIa\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
543 The move command repositions the addressed lines after the line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
544 addressed by
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
545 .IR a .
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
546 The last of the moved lines becomes the current line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
547 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
548 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBn\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
549 This command prints lines preceded by their line numbers.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
550 It otherwise acts like the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
551 .I p
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
552 command described below.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
553 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
554 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBp\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
555 The print command prints the addressed lines.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
556 `\fB.\fR'
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
557 is left at the last line printed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
558 The
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
559 .I p
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
560 command
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
561 may
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
562 be placed on the same line after any non-i/o command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
563 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
564 .B P
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
565 This command causes a prompt to be printed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
566 before following commands are read.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
567 The default prompt is a `*' character,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
568 but can be set with the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
569 .I \-p
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
570 command line option (which also enables the prompt).
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
571 Another
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
572 .I P
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
573 disables the prompt.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
574 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
575 .B q
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
576 The quit command causes
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
577 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
578 to exit.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
579 No automatic write
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
580 of a file is done.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
581 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
582 .B Q
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
583 This command is the same as
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
584 .I q,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
585 except that no diagnostic results when no
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
586 .I w
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
587 has been given since the last buffer alteration.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
588 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
589 \fR(\fI$\fR)\|\fBr\ \fIfilename\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
590 The read command
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
591 reads in the given file after the addressed line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
592 If no file name is given,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
593 the remembered file name, if any, is used
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
594 (see
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
595 .I e
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
596 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
597 .I f
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
598 commands)\|.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
599 The file name is remembered if there was no
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
600 remembered file name already.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
601 Address `0' is legal for
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
602 .I r
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
603 and causes the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
604 file to be read at the beginning of the buffer.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
605 If the read is successful, the number of characters
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
606 read is typed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
607 `\fB.\fR' is left at the last line read in from the file.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
608 A `filename' starting with a `\fB!\fR'
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
609 causes the output of the shell command following this character
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
610 to be read in.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
611 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
612 \fR(\|\fI.\fB\|,\|\fI.\fR\|)\|\fBs/\fIregular expression\fB/\fIreplacement\fB/\fR or,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
613 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
614 .ns
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
615 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
616 \fR(\|\fI.\fB\|,\|\fI.\fR\|)\|\fBs/\fIregular expression\fB/\fIreplacement\fB/g\fR or,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
617 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
618 .ns
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
619 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
620 \fR(\|\fI.\fB\|,\|\fI.\fR\|)\|\fBs/\fIregular expression\fB/\fIreplacement\fB/\fInumber\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
621 The substitute command searches each addressed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
622 line for an occurrence of the specified regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
623 On each line in which a match is found,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
624 all matched strings are replaced by the replacement specified,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
625 if the global replacement indicator
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
626 .RB ` g '
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
627 appears after the command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
628 If the global indicator does not appear, only the first occurrence
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
629 of the matched string is replaced;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
630 if the \fInumber\fR indicator is given,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
631 the numbered occurrence is replaced.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
632 It is an error for the substitution to fail on all addressed lines.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
633 Any character other than space or new-line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
634 may be used instead of `/' to delimit the regular expression
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
635 and the replacement.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
636 `\fB.\fR' is left at the last line substituted.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
637 .IP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
638 An ampersand
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
639 .RB ` & '
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
640 appearing in the replacement
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
641 is replaced by the string matching the regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
642 The special meaning of `&' in this context may be
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
643 suppressed by preceding it by
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
644 .RB ` \e '.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
645 The characters `\|\fB\e\fIn\fR'
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
646 where
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
647 .I n
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
648 is a digit,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
649 are replaced by the text matched by the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
650 .IR n -th
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
651 regular subexpression
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
652 enclosed between `\e(' and `\e)'.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
653 When
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
654 nested, parenthesized subexpressions
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
655 are present,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
656 .I n
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
657 is determined by counting occurrences of `\e(' starting from the left.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
658 .IP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
659 A substitution string consisting of a single
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
660 .RB ` % '
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
661 causes the string given on the previous substitution to be re-used.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
662 .IP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
663 Lines may be split by substituting new-line characters into them.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
664 The new-line in the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
665 replacement string
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
666 must be escaped by preceding it by
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
667 .RB ` \e '.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
668 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
669 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBt\|\fIa\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
670 This command acts just like the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
671 .I m
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
672 command, except that a copy of the addressed lines is placed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
673 after address
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
674 .I a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
675 (which may be 0).
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
676 `\fB.\fR' is left on the last line of the copy.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
677 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
678 .B u
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
679 The undo command restores
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
680 the contents of the buffer
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
681 before the last command was executed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
682 If the undo command is given twice,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
683 the current state is restored.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
684 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
685 \fR(\fI1\fB,\fI$\fR)\|\fBv/\fIregular expression\fB/\fIcommand list\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
686 This command is the same as the global command
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
687 .I g
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
688 except that the command list is executed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
689 .I g
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
690 with `\fB.\fR' initially set to every line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
691 .I except
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
692 those
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
693 matching the regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
694 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
695 \fR(\fI1\fB,\fI$\fR)\|\fBV/\fIregular expression\fB/\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
696 This command is the same as the interactive global command
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
697 .I G
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
698 except that the commands are read
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
699 .I g
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
700 with `\fB.\fR' initially set to every line
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
701 .I except
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
702 those
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
703 matching the regular expression.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
704 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
705 \fR(\fI1\fB,\fI$\fR)\|\fBw\ \fIfilename\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
706 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
707 The write command writes the addressed lines onto
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
708 the given file.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
709 If the file does not exist,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
710 it is created mode 666 (readable and writable by everyone)\|.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
711 The file name is remembered if there was no
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
712 remembered file name already.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
713 If no file name is given,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
714 the remembered file name, if any, is used
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
715 (see
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
716 .I e
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
717 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
718 .I f
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
719 commands)\|.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
720 `\fB.\fR' is unchanged.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
721 If the command is successful, the number of characters written is
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
722 printed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
723 A `filename' starting with a `\fB!\fR'
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
724 causes the string following this character
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
725 to be executed as a shell command
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
726 with the addressed lines as standard input.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
727 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
728 \fR(\fI1\fB,\fI$\fR)\fBW\ \fIfilename\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
729 This command is the same as
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
730 .I w,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
731 except that the addressed lines are appended to the file.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
732 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
733 \fR(\fI$\fR)\|\fB=\fR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
734 The line number of the addressed line is typed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
735 `\fB.\fR' is unchanged by this command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
736 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
737 \fB!\fR<shell command>
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
738 The remainder of the line after the `!' is sent
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
739 to
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
740 .IR sh (1)
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
741 to be interpreted as a command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
742 .RB ` . '
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
743 is unchanged.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
744 If the command starts with a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
745 .RB ` ! ',
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
746 the previous command is inserted.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
747 A
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
748 .RB ` % '
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
749 causes the current file name to be inserted.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
750 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
751 \fR(\|\fI.+1\fR)\|<newline>
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
752 An address alone on a line causes the addressed line to be printed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
753 A blank line alone is equivalent to `.+1p'; it is useful
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
754 for stepping through text.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
755 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
756 The following commands are extensions:
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
757 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
758 \fR(\|\fI.\|\fR)\fB\|b\fR[\fIcount\fR]
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
759 Prints a screenful of lines,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
760 starting at the addressed one,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
761 and browses forward in the buffer by this amount.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
762 With the optional
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
763 .I count
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
764 argument, the screen size for this and following
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
765 .I b
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
766 commands is set to the given number of lines.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
767 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
768 .B help
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
769 Causes a summary of
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
770 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
771 commands along with short descriptions
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
772 to be printed on the terminal.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
773 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
774 .B N
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
775 Makes the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
776 .I p
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
777 command behave like the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
778 .I n
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
779 command and vice-versa.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
780 If given a second time,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
781 the original semantics are restored.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
782 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
783 \fR(\|\fI.\|\fR)\fB\|o\fR[\fIcount\fR]
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
784 Prints a screenful of lines centered around the addressed one.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
785 The current line is not changed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
786 With the optional
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
787 .I count
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
788 argument, the amount of lines printed above and below
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
789 for this and following
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
790 .I o
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
791 commands is set to the given number.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
792 .TP 5
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
793 .B z
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
794 Performs the same actions as a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
795 .I w
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
796 command followed by a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
797 .I q
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
798 command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
799 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
800 If an interrupt signal is sent,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
801 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
802 prints a `?' and returns to its command level.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
803 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
804 An input line that consists exactly of the two characters `\e.'
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
805 causes a period `.' to be inserted with the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
806 .IR a ,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
807 .IR c ,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
808 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
809 .IR i
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
810 commands.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
811 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
812 Some size limitations:
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
813 The maximum number of bytes in the buffer
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
814 corresponds to the address size;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
815 on machines with 32-bit addressing,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
816 it is 2\ G bytes,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
817 with 64-bit addressing,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
818 it is 9\ E bytes.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
819 The limit on the number of lines depends on the amount of core:
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
820 each line takes 2 words.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
821 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
822 If a line contains a NUL character,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
823 regular expressions cannot match beyond this character.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
824 A substitute command deletes a NUL
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
825 and all following characters on the line.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
826 NUL characters in command input are discarded.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
827 If an input file does not end with a newline,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
828 .I ed
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
829 prints a message and appends one.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
830 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
831 Omission of the `/' character
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
832 following the regular expression or the replacement string
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
833 to the global and substitute commands
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
834 causes the affected lines to be printed.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
835 Thus the following commands have the same effect:
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
836 .RS
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
837 g/pattern g/pattern/p
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
838 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
839 s/pattern/repl s/pattern/repl/p
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
840 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
841 s/pattern/ s/pattern//p
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
842 .RE
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
843 .SH "ENVIRONMENT VARIABLES"
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
844 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
845 .BR LANG ", " LC_ALL
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
846 See
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
847 .IR locale (7).
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
848 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
849 .B LC_CTYPE
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
850 Determines the mapping of bytes to characters
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
851 and the set of printable characters for the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
852 .I l
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
853 command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
854 .TP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
855 .B TMPDIR
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
856 Determines the location of the temporary file
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
857 if it contains the name of an accessible directory.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
858 .SH FILES
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
859 /var/tmp/e*
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
860 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
861 /tmp/e*
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
862 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
863 ed.hup: work is saved here if terminal hangs up
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
864 .SH "SEE ALSO"
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
865 B. W. Kernighan,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
866 .I
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
867 A Tutorial Introduction to the ED Text Editor
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
868 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
869 B. W. Kernighan,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
870 .I Advanced editing on UNIX
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
871 .br
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
872 bfs(1),
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
873 grep(1),
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
874 sed(1),
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
875 sh(1)
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
876 .SH DIAGNOSTICS
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
877 `?name' for inaccessible file;
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
878 `?' for
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
879 errors in commands,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
880 possibly followed by a verbose description
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
881 (see the description for the
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
882 .I h
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
883 and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
884 .I H
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
885 commands above).
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
886 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
887 To protect against throwing away valuable work,
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
888 a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
889 .I q
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
890 or
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
891 .I e
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
892 command is considered to be in error, unless a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
893 .I w
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
894 has occurred since the last buffer change.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
895 A second
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
896 .I q
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
897 or
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
898 .I e
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
899 will be obeyed regardless.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
900 .SH NOTES
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
901 A
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
902 .I !\&
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
903 command cannot be subject to a
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
904 .I g
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
905 command.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
906 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
907 The LC_COLLATE variable has currently no effect.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
908 Ranges in bracket expressions are ordered
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
909 as byte values in single-byte locales
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
910 and as wide character values in multibyte locales.
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
911 .PP
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
912 For portable programs, restrict textual data
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
913 to the US-ASCII character set and
1493bea5ac22 Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff changeset
914 set the LC_CTYPE and LC_COLLATE variables to `C' or `POSIX'.