Age | Commit message (Collapse) | Author |
|
Otherwise, if ed's output is not line buffered (e.g. if it is
redirected to a file or pipe) the shell command output may be
displayed before data buffered by ed itself is written.
From Soeren Tempel. OK deraadt@
|
|
and installing USD/SMM/PSD docs.
jmc@ agrees with the direction, ok millert@ on an earlier diff
|
|
Adapt substitute test to new ed(1) behavior. Note that substitute
result from sed(1) is still different.
|
|
Adapt ed test.
|
|
Adapt ed test.
|
|
Both have the same meaning, but the former is explicitly defined
in this manual page as "the next line" whereas the latter requires
combining various pieces of information for understanding.
Unification suggested and patch OK'ed by martijn@.
|
|
implementation; it was oversimplified and arguably incorrect.
2. Explicitely compare the behaviour of empty command lists for g,
empty command lists for G, and empty commands because these subtle
differences are quite confusing.
3. Say more precisely what the v and V commands do, avoiding the
fuzzy wording "similar".
All these issues were first pointed out by martijn@.
Feedback and OK martijn@; "diff reads ok" jmc@ on an earlier version.
|
|
the g and G commands, and polish the wording a bit explaining empty
command lists.
Closing a gap in the manual reported by <mazocomp at disroot dot org>.
OK jmc@ martijn@
|
|
* Delete a stray blank from the command line synopsis
and add the missing .Ar markup to it.
* Do not mention the terminating newline for the empty command
since it isn't mentioned for any other command either.
* Make the description of the empty command easier to understand.
Joint work with martijn@ and jmc@.
|
|
thread started by mazocomp; diff from ropers, shortened by me;
ok martijn schwarze
|
|
|
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
EOF in case of errors, not any negative number.
EOF corner case spotted while reviewing a much bigger diff by deraadt
OK deraadt, millert
|
|
|
|
are balanced.
OK millert@ and tb@
|
|
OK tb@
|
|
This is similar to what vi/ex does and removes the final BACKWARDS flag.
Behaviour requested by and OK tb@
|
|
behaviour.
OK tb@
|
|
Most terminals have scrollback options, or can be achieved via tmux, so
it's not needed.
OK millert@
|
|
POSIX states: "An empty command list shall be equivalent to the p command",
so changing the behaviour of a null-command in any other case is a
violation of POSIX.
OK millert@
|
|
code and removes a few BACKWARDS flags.
OK otto@
|
|
'$' characters are escaped, so that we are POSIX compliant.
The omission of trailing '$' was originally hidden behind a BACKWARDS
flag. This flag was most likely introduced to be compatible with 4.4BSD.
Thanks to naddy@ for pointing me to the 4.4BSD ed implementation.
I tried to trace the origin and enabling of the BACKWARDS flag, since
both FreeBSD and NetBSD have the flag, but only FreeBSD doesn't have it
enabled. Both projects had an alm@ working on ed during 1993-1995 during
which he added this flag to both projects and only enabled it on NetBSD,
but I wasn't able to reach him on any known address.
Thanks to Ed Schouten (ed@freebsd), and Michael W. Lucas of the ed
Mastery book for helping me trying to locate Andrew Moore.
Problem originally prodded by garzon.lucero@gmail.com and later
independently re-requested by n.reusse@hxgn.net.
OK tb@, guenther@, and mwl@mwl.io
|
|
trying to quit.
Diff from Tim Chase
OK tb@ and millert@
|
|
|
|
|
|
passing empty format strings to printf-family functions; ok millert@
|
|
as per POSIX. With this patch, ",n" is an abbreviation for "1,n",
";n" abbreviates ".;n". The "n," and "n;" variants mean "n,n" and "n;n",
respectively.
Patch from Jerome FRGAGIC; ok stefan, deraadt
|
|
Found because of a hint by and OK schwarze@.
|
|
If a zero-length match is found do the replacement and increment the start point
for the next search by one. This allows for commands like s/^/- /
This brings the behaviour closer to the way sed and vi work.
OK schwarze@
|
|
prompt for huge lines (according to otto this happens only when
BACKWARDS is not defined);
ok otto
|
|
modified flag.
from Jerome Frgacic (jerome.frgacic (at) yahoo.fr)
ok tb
|
|
nit fix and OK schwarze@
|
|
from Edgar Pettijohn, ok and with input from tb@
|
|
from Edgar Pettijohn, correction from deraadt@
|
|
sense to document that posix more or less says something should happen,
and that it does.
jmc
|
|
off and then on again with 'P'.
ok daniel@
|
|
Fortunately, we don't need it as we only pass siglongjmp() a single value.
ok deraadt@
|
|
|
|
buffer to construct error messages.
with input by and ok millert@
|
|
ok millert@
|
|
Also make stdin unbuffered since that is the same as using a
single-byte buffer. OK tobias@
|
|
|
|
it is a shell (it has a !command). tty because it uses TIOCGWINSZ in
a SIGWINCH handler.
|
|
just use regex_t directly.
|
|
SIGWINCH, it is not POSIX but it is a defacto standard.
OK deraadt@
|
|
In some cases, do additional cleanup in the immediate vicinity.
|
|
|
|
rather than sharing one variable unsafely.
ok millert
|
|
|
|
be reinstated when toggled off then on again; this seems to make sense,
but posix is not explicit.
we know that gnu ed and freebsd do reinstate the user defined prompt, but
we do not. no one has yet stepped up to change this, so i'm adding a note
to this effect until such a time as we do/
i have not tweaked the text for -p or "P" to allow for an easy back out
if behaviour does change;
|