name wf/ed
description somewhat POSIX-compliant ed(1) implementation in pure mksh
last change 2026-07-27
clone url
https://srcdump.net/wf/ed.git

commit briefs

branches

refs

tree

14 L
24 L
ed
1007 L

readme

 1Somewhat POSIX-compliant (see below) ed implementation in pure mksh.
 2The code is quite heavily commented to also serve as a learning
 3source.
 4
 5To do (x: completed, ~: partially completed, ' ': not completed):
 6 [~] Regexp.
 7 [ ] Advanced address syntax.
 8 [x] Command suffixes (l/n/p).
 9 [x] Marks.
10 [ ] Check if a file is writable before trying to write something
11     into it.
12
13Bugs and inconsistencies:
14 - `w !...' doesn't track the amount of bytes that were transferred.
15   This is a shell scope limitation.
16 - The 'regular expressions' are in ksh [2] format rather than POSIX
17   regexp. This is an mksh limitation.
18 - Most likely more. A lot of the possible edge cases (especially
19   with the addresses) weren't tested and could be anything from just
20   not compliant with the spec to outright dangerous.
21
22[1]: https://www.man7.org/linux/man-pages/man1/ed.1p.html
23[2]: https://man.voidlinux.org/mksh#File_name_patterns