Mercurial > heirloom-ed
annotate ed.1 @ 2:a09d0630f05b
removed unnecessary command line options
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Tue, 12 Aug 2014 18:08:24 +0200 |
parents | 1493bea5ac22 |
children | ac52712b2b5e |
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 |
2
a09d0630f05b
removed unnecessary command line options
markus schnalke <meillo@marmaro.de>
parents:
0
diff
changeset
|
41 \fBed\fR [\fB\-\fR\] [\fIname\fR] |
0
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 suppresses the printing |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
59 of character counts by |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
60 .IR e , |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
61 .IR r , |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
62 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
63 .I w |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
64 commands, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
65 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
|
66 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
67 .I Ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
68 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
|
69 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
|
70 .IR w "" |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
71 (write)\| |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
72 command is given. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
73 The copy of the text being edited resides |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
74 in a temporary file called the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
75 .IR buffer . |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
76 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
77 The editor supports format specifications as defined in |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
78 .IR fspec (5). |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
79 If the terminal is configured to expand tabulators |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
80 (as enabled with |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
81 .I stty tab3 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
82 or |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
83 .IR "stty \-tabs"), |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
84 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
|
85 contains a format specification, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
86 the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
87 .I t |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
88 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
89 .I s |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
90 are interpreted, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
91 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
|
92 when printing to the terminal. For example, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
93 .RS |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
94 <:t\-f s72:> |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
95 .sp |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
96 .RE |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
97 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
|
98 No expansion or truncation is performed by |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
99 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
100 when input is typed to the terminal. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
101 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
102 Commands to |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
103 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
104 have a simple and regular structure: zero or |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
105 more |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
106 .I addresses |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
107 followed by a single character |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
108 .I command, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
109 possibly |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
110 followed by parameters to the command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
111 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
|
112 Missing addresses are supplied by default. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
113 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
114 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
|
115 Certain commands allow the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
116 addition of text to the buffer. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
117 While |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
118 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
119 is accepting text, it is said |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
120 to be in |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
121 .I "input mode." |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
122 In this mode, no commands are recognized; |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
123 all input is merely collected. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
124 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
|
125 beginning of a line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
126 .PP |
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 supports a limited form of |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
129 .I "regular expression" |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
130 notation. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
131 A regular expression specifies |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
132 a set of strings of characters. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
133 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
|
134 .I matched |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
135 by the regular expression. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
136 In the following specification for regular expressions |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
137 the word `character' means any character but newline. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
138 .B ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
139 uses simple regular expressions. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
140 .SS "Simple Regular Expressions" |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
141 .IP 1. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
142 Any character except a special character |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
143 matches itself. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
144 Special characters are |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
145 the regular expression delimiter plus |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
146 .RB \e\|[\| . |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
147 and sometimes ^\|*\|$. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
148 .IP 2. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
149 A |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
150 .B .\& |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
151 matches any character. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
152 .IP 3. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
153 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
|
154 or (\|) {\|} <\|> matches that character. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
155 .IP 4. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
156 A nonempty string |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
157 .I s |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
158 bracketed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
159 \fB[\fI\|s\|\fB]\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
160 (or |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
161 \fB[^\fIs\|\fB]\fR) |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
162 forms a \fIbracket expression\fR that |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
163 matches any character in (or not in) |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
164 .I s. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
165 In |
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 \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
|
168 the first letter. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
169 A substring |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
170 \fIa\fB\-\fIb\fR, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
171 with |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
172 .I a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
173 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
174 .I b |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
175 in ascending ASCII order, stands for the inclusive |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
176 range of ASCII characters. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
177 .IP 5. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
178 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
|
179 0 or more matches of the regular expression. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
180 .IP 6. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
181 A regular expression of form 1-4 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
182 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
|
183 forms an \fIinterval expression\fR that |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
184 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
|
185 of the regular expression. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
186 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
|
187 and smaller than 256. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
188 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
|
189 \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
|
190 .IP 7. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
191 The sequence \fB\e<\fR forces the match |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
192 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
|
193 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
|
194 or just before a letter, digit or underline |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
195 and after a character not one of these. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
196 .IP 8. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
197 The sequence \fB\e>\fR matches the end |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
198 of a ``variable'' or ``word'', |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
199 i.\|e. either the end of the line |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
200 or before character which is neither a letter, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
201 nor a digit, nor the underline character. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
202 .IP 9. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
203 A regular expression, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
204 .I x, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
205 of form 1-11, parenthesized |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
206 \fB\e(\fI\|x\|\fB\e)\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
207 is called a \fIsubexpression\fR and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
208 matches what |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
209 .I x |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
210 matches. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
211 .IP 10. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
212 A \fB\e\fR followed by a digit |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
213 .I n |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
214 forms a \fIbackreference\fR and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
215 matches a copy of the string that the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
216 parenthesized regular expression beginning with the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
217 .IR n th |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
218 \e( matched. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
219 .IP 11. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
220 A regular expression of form 1-11, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
221 .I x, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
222 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
|
223 .I y |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
224 matches a match for |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
225 .I x |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
226 followed by a match for |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
227 .I y, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
228 with the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
229 .I x |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
230 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
|
231 .I y |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
232 match. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
233 .IP 12. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
234 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
|
235 (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
|
236 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
|
237 (\fIanchoring\fR). |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
238 .IP 13. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
239 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
|
240 longest among the leftmost matches in a line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
241 .IP 14. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
242 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
|
243 last regular expression encountered. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
244 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
245 Regular expressions are used in addresses to specify |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
246 lines and in one command |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
247 (see |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
248 .I s |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
249 below)\| |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
250 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
|
251 If it is desired to use one of |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
252 the regular expression metacharacters as an ordinary |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
253 character, that character may be preceded by `\e'. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
254 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
|
255 expression (often `/')\| and to `\e' itself. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
256 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
257 To understand addressing in |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
258 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
259 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
|
260 .I "current line." |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
261 Generally speaking, the current line is |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
262 the last line affected by a command; however, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
263 the exact effect on the current line |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
264 is discussed under the description of |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
265 the command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
266 Addresses are constructed as follows. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
267 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
268 1. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
269 The character `\fB.\fR' addresses the current line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
270 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
271 2. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
272 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
|
273 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
274 3. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
275 A decimal number |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
276 .I n |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
277 addresses the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
278 .IR n -th |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
279 line of the buffer. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
280 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
281 4. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
282 `\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
|
283 .IR x , |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
284 which must be a lower-case letter. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
285 Lines are marked with the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
286 .I k |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
287 command described below. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
288 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
289 5. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
290 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
|
291 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
|
292 and stopping at the first line containing a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
293 string that matches the regular expression. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
294 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
|
295 buffer. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
296 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
297 6. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
298 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
|
299 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
|
300 and stopping at the first line containing |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
301 a string that matches the regular expression. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
302 If necessary |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
303 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
|
304 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
305 7. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
306 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
|
307 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
|
308 specifies that address plus |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
309 (resp. minus)\| the indicated number of lines. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
310 The plus sign may be omitted. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
311 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
312 8. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
313 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
|
314 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
|
315 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
|
316 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
317 9. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
318 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
|
319 then 1 is added (resp. subtracted). |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
320 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
|
321 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
|
322 Moreover, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
323 trailing |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
324 `+' and `\-' characters |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
325 have cumulative effect, so `\-\-' refers to the current |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
326 line less 2. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
327 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
328 10. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
329 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
|
330 the character `\fB^\fR' in addresses is |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
331 equivalent to `\-'. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
332 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
333 Commands may require zero, one, or two addresses. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
334 Commands which require no addresses regard the presence |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
335 of an address as an error. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
336 Commands which accept one or two addresses |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
337 assume default addresses when insufficient are given. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
338 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
|
339 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
|
340 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
341 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
|
342 `\fB,\fR'. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
343 They may also be separated by a semicolon |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
344 `\fB;\fR'. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
345 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
|
346 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
|
347 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
|
348 line for forward and backward searches (`/', `?')\|. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
349 The second address of any two-address sequence |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
350 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
|
351 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
352 Omission of the first address causes |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
353 the first line to be used with `,', |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
354 or the current line with `;', respectively; |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
355 if the second address is also omitted, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
356 the last line of the buffer is used. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
357 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
|
358 and a single `;' specifies the contents |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
359 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
|
360 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
361 In the following list of |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
362 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
363 commands, the default addresses |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
364 are shown in parentheses. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
365 The parentheses are not part of |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
366 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
|
367 the default. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
368 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
369 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
|
370 command to appear on a line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
371 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
|
372 in which case |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
373 the current line is either |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
374 printed, listed, or numbered respectively |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
375 in the way discussed below. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
376 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
377 \fR(\|\fI.\|\fR)\fB\|a\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
378 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
379 .ns |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
380 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
381 <text> |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
382 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
383 .ns |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
384 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
385 .B . |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
386 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
387 The append command reads the given text |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
388 and appends it after the addressed line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
389 `\fB.\fR' is left |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
390 on the last line input, if there |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
391 were any, otherwise at the addressed line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
392 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
|
393 at the beginning of the buffer. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
394 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
395 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBc\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
396 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
397 .ns |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
398 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
399 <text> |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
400 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
401 .ns |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
402 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
403 .B . |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
404 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
405 The change |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
406 command deletes the addressed lines, then accepts input |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
407 text which replaces these lines. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
408 `\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
|
409 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
|
410 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
411 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBd\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
412 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
|
413 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
|
414 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
|
415 the new last line becomes the current line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
416 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
417 \fBe\ \fIfilename\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
418 The edit |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
419 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
|
420 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
|
421 `\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
|
422 The number of characters read is typed. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
423 `\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
|
424 in a subsequent |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
425 .I r |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
426 or |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
427 .I w |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
428 command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
429 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
|
430 A `\fIfilename\fR' starting with a `\fB!\fR' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
431 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
|
432 to be read in. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
433 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
434 \fBE\ \fIfilename\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
435 This command is the same as |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
436 .IR e , |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
437 except that no diagnostic results when no |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
438 .I w |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
439 has been given since the last buffer alteration. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
440 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
441 \fBf\ \fIfilename\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
442 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
|
443 If `\fIfilename\fR' is given, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
444 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
|
445 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
446 \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
|
447 In the global |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
448 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
|
449 the given \fIregular expression\fR. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
450 Then for every such line, the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
451 given \fIcommand list\fR is executed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
452 with `\fB.\fR' initially set to that line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
453 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
|
454 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
|
455 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
|
456 .I A, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
457 .I i, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
458 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
459 .I c |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
460 commands and associated input are permitted; |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
461 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
|
462 last line of the command list. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
463 The commands |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
464 .I g |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
465 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
466 .I v |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
467 are not permitted in the command list. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
468 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
469 \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
|
470 The interactive global command |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
471 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
|
472 Then each line is printed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
473 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
|
474 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
|
475 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
|
476 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
|
477 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
478 .B h |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
479 This command prints a verbose description for the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
480 last error encountered. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
481 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
482 .B H |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
483 This command acts like the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
484 .I h |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
485 command, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
486 but also causes verbose descriptions to be printed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
487 on all following error conditions. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
488 Another |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
489 .I H |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
490 turns verbose mode off. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
491 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
492 \fR(\|\fI.\|\fR)\|\fBi\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
493 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
494 .ns |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
495 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
496 <text> |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
497 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
498 .ns |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
499 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
500 .B . |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
501 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
502 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
|
503 `\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
|
504 at the line before the addressed line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
505 This command differs from the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
506 .I a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
507 command only in the placement of the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
508 text. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
509 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
510 \fR(\|\fI.\|\fB,\|\fI.+1\fR)\|\fBj\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
511 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
|
512 intermediate newlines simply disappear. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
513 `\fB.\fR' is left at the resulting line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
514 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
515 \fR(\fI.\fR)\|\fBk\fIx\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
516 The mark command marks the addressed line with |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
517 name |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
518 .IR x , |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
519 which must be a lower-case letter. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
520 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
|
521 .ne 2.5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
522 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
523 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBl\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
524 The list command |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
525 prints the addressed lines in an unambiguous way: |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
526 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
|
527 Long lines are folded. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
528 The |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
529 .I l |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
530 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
|
531 command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
532 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
533 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBm\fIa\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
534 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
|
535 addressed by |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
536 .IR a . |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
537 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
|
538 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
539 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBn\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
540 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
|
541 It otherwise acts like the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
542 .I p |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
543 command described below. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
544 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
545 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBp\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
546 The print command prints the addressed lines. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
547 `\fB.\fR' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
548 is left at the last line printed. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
549 The |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
550 .I p |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
551 command |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
552 may |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
553 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
|
554 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
555 .B P |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
556 This command causes a prompt to be printed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
557 before following commands are read. |
2
a09d0630f05b
removed unnecessary command line options
markus schnalke <meillo@marmaro.de>
parents:
0
diff
changeset
|
558 The default prompt is a `*' character. |
0
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
559 Another |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
560 .I P |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
561 disables the prompt. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
562 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
563 .B q |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
564 The quit command causes |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
565 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
566 to exit. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
567 No automatic write |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
568 of a file is done. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
569 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
570 .B Q |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
571 This command is the same as |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
572 .I q, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
573 except that no diagnostic results when no |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
574 .I w |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
575 has been given since the last buffer alteration. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
576 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
577 \fR(\fI$\fR)\|\fBr\ \fIfilename\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
578 The read command |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
579 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
|
580 If no file name is given, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
581 the remembered file name, if any, is used |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
582 (see |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
583 .I e |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
584 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
585 .I f |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
586 commands)\|. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
587 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
|
588 remembered file name already. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
589 Address `0' is legal for |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
590 .I r |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
591 and causes the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
592 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
|
593 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
|
594 read is typed. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
595 `\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
|
596 A `filename' starting with a `\fB!\fR' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
597 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
|
598 to be read in. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
599 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
600 \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
|
601 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
602 .ns |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
603 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
604 \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
|
605 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
606 .ns |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
607 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
608 \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
|
609 The substitute command searches each addressed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
610 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
|
611 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
|
612 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
|
613 if the global replacement indicator |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
614 .RB ` g ' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
615 appears after the command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
616 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
|
617 of the matched string is replaced; |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
618 if the \fInumber\fR indicator is given, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
619 the numbered occurrence is replaced. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
620 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
|
621 Any character other than space or new-line |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
622 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
|
623 and the replacement. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
624 `\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
|
625 .IP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
626 An ampersand |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
627 .RB ` & ' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
628 appearing in the replacement |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
629 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
|
630 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
|
631 suppressed by preceding it by |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
632 .RB ` \e '. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
633 The characters `\|\fB\e\fIn\fR' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
634 where |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
635 .I n |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
636 is a digit, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
637 are replaced by the text matched by the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
638 .IR n -th |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
639 regular subexpression |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
640 enclosed between `\e(' and `\e)'. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
641 When |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
642 nested, parenthesized subexpressions |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
643 are present, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
644 .I n |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
645 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
|
646 .IP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
647 A substitution string consisting of a single |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
648 .RB ` % ' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
649 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
|
650 .IP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
651 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
|
652 The new-line in the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
653 replacement string |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
654 must be escaped by preceding it by |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
655 .RB ` \e '. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
656 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
657 \fR(\|\fI.\|\fB,\|\fI.\|\fR)\|\fBt\|\fIa\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
658 This command acts just like the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
659 .I m |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
660 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
|
661 after address |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
662 .I a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
663 (which may be 0). |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
664 `\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
|
665 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
666 .B u |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
667 The undo command restores |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
668 the contents of the buffer |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
669 before the last command was executed. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
670 If the undo command is given twice, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
671 the current state is restored. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
672 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
673 \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
|
674 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
|
675 .I g |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
676 except that the command list is executed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
677 .I g |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
678 with `\fB.\fR' initially set to every line |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
679 .I except |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
680 those |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
681 matching the regular expression. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
682 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
683 \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
|
684 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
|
685 .I G |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
686 except that the commands are read |
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 with `\fB.\fR' initially set to every line |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
689 .I except |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
690 those |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
691 matching the regular expression. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
692 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
693 \fR(\fI1\fB,\fI$\fR)\|\fBw\ \fIfilename\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
694 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
695 The write command writes the addressed lines onto |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
696 the given file. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
697 If the file does not exist, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
698 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
|
699 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
|
700 remembered file name already. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
701 If no file name is given, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
702 the remembered file name, if any, is used |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
703 (see |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
704 .I e |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
705 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
706 .I f |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
707 commands)\|. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
708 `\fB.\fR' is unchanged. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
709 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
|
710 printed. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
711 A `filename' starting with a `\fB!\fR' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
712 causes the string following this character |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
713 to be executed as a shell command |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
714 with the addressed lines as standard input. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
715 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
716 \fR(\fI1\fB,\fI$\fR)\fBW\ \fIfilename\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
717 This command is the same as |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
718 .I w, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
719 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
|
720 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
721 \fR(\fI$\fR)\|\fB=\fR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
722 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
|
723 `\fB.\fR' is unchanged by this command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
724 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
725 \fB!\fR<shell command> |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
726 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
|
727 to |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
728 .IR sh (1) |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
729 to be interpreted as a command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
730 .RB ` . ' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
731 is unchanged. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
732 If the command starts with a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
733 .RB ` ! ', |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
734 the previous command is inserted. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
735 A |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
736 .RB ` % ' |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
737 causes the current file name to be inserted. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
738 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
739 \fR(\|\fI.+1\fR)\|<newline> |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
740 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
|
741 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
|
742 for stepping through text. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
743 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
744 The following commands are extensions: |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
745 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
746 \fR(\|\fI.\|\fR)\fB\|b\fR[\fIcount\fR] |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
747 Prints a screenful of lines, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
748 starting at the addressed one, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
749 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
|
750 With the optional |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
751 .I count |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
752 argument, the screen size for this and following |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
753 .I b |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
754 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
|
755 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
756 .B help |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
757 Causes a summary of |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
758 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
759 commands along with short descriptions |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
760 to be printed on the terminal. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
761 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
762 .B N |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
763 Makes the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
764 .I p |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
765 command behave like the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
766 .I n |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
767 command and vice-versa. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
768 If given a second time, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
769 the original semantics are restored. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
770 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
771 \fR(\|\fI.\|\fR)\fB\|o\fR[\fIcount\fR] |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
772 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
|
773 The current line is not changed. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
774 With the optional |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
775 .I count |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
776 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
|
777 for this and following |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
778 .I o |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
779 commands is set to the given number. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
780 .TP 5 |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
781 .B z |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
782 Performs the same actions as a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
783 .I w |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
784 command followed by a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
785 .I q |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
786 command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
787 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
788 If an interrupt signal is sent, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
789 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
790 prints a `?' and returns to its command level. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
791 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
792 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
|
793 causes a period `.' to be inserted with the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
794 .IR a , |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
795 .IR c , |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
796 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
797 .IR i |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
798 commands. |
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 Some size limitations: |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
801 The maximum number of bytes in the buffer |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
802 corresponds to the address size; |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
803 on machines with 32-bit addressing, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
804 it is 2\ G bytes, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
805 with 64-bit addressing, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
806 it is 9\ E bytes. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
807 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
|
808 each line takes 2 words. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
809 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
810 If a line contains a NUL character, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
811 regular expressions cannot match beyond this character. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
812 A substitute command deletes a NUL |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
813 and all following characters on the line. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
814 NUL characters in command input are discarded. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
815 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
|
816 .I ed |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
817 prints a message and appends one. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
818 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
819 Omission of the `/' character |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
820 following the regular expression or the replacement string |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
821 to the global and substitute commands |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
822 causes the affected lines to be printed. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
823 Thus the following commands have the same effect: |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
824 .RS |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
825 g/pattern g/pattern/p |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
826 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
827 s/pattern/repl s/pattern/repl/p |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
828 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
829 s/pattern/ s/pattern//p |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
830 .RE |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
831 .SH "ENVIRONMENT VARIABLES" |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
832 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
833 .BR LANG ", " LC_ALL |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
834 See |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
835 .IR locale (7). |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
836 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
837 .B LC_CTYPE |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
838 Determines the mapping of bytes to characters |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
839 and the set of printable characters for the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
840 .I l |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
841 command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
842 .TP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
843 .B TMPDIR |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
844 Determines the location of the temporary file |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
845 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
|
846 .SH FILES |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
847 /var/tmp/e* |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
848 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
849 /tmp/e* |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
850 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
851 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
|
852 .SH "SEE ALSO" |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
853 B. W. Kernighan, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
854 .I |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
855 A Tutorial Introduction to the ED Text Editor |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
856 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
857 B. W. Kernighan, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
858 .I Advanced editing on UNIX |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
859 .br |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
860 bfs(1), |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
861 grep(1), |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
862 sed(1), |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
863 sh(1) |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
864 .SH DIAGNOSTICS |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
865 `?name' for inaccessible file; |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
866 `?' for |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
867 errors in commands, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
868 possibly followed by a verbose description |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
869 (see the description for the |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
870 .I h |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
871 and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
872 .I H |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
873 commands above). |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
874 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
875 To protect against throwing away valuable work, |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
876 a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
877 .I q |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
878 or |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
879 .I e |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
880 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
|
881 .I w |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
882 has occurred since the last buffer change. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
883 A second |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
884 .I q |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
885 or |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
886 .I e |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
887 will be obeyed regardless. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
888 .SH NOTES |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
889 A |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
890 .I !\& |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
891 command cannot be subject to a |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
892 .I g |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
893 command. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
894 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
895 The LC_COLLATE variable has currently no effect. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
896 Ranges in bracket expressions are ordered |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
897 as byte values in single-byte locales |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
898 and as wide character values in multibyte locales. |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
899 .PP |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
900 For portable programs, restrict textual data |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
901 to the US-ASCII character set and |
1493bea5ac22
Initial version of the standalone heirloom-ed
markus schnalke <meillo@marmaro.de>
parents:
diff
changeset
|
902 set the LC_CTYPE and LC_COLLATE variables to `C' or `POSIX'. |