ged
is ed
rewritten in pure Go. Ged is the wizard of earthsea.
To install ged
, you need Go >= 1.12. Once you have that, just:
$ go get github.com/jlowellwofford/ged
This will install ged
in $GOPATH/bin
.
To build by hand, use (inside the folder where you have the ged
source):
$ git clone https://github.com/jlowellwofford/ged
$ cd ged
$ go build .
Once you have ged
in your path, you should be able to run it and it should behave more-or-less like GNU Ed
.
ged
is intended to be a feature-complete mimick of GNU Ed. It is a close enough mimick that the GNU Ed Man Page should be a reliable source of documentation. Divergence from the man page is generally considered a bug (unless it's an added feature).
There are a few known differences:
ged
usesgo
'sregexp
package, and as such may have a somewhat different regular expression syntax. Note, however, that backreferences follow theed
syntax of\<ref>
, not thego
syntax of$<ref>
.- there has been little/no attempt to make particulars like error messages match
GNU Ed
. - rather than being an error, the 'g' option for 's' simply overrides any specified count.
- does not support "traditional" mode
The following has been implemented:
- Full line address parsing (including RE and markings)
- Implmented commands: !, #, =, E, H, P, Q, W, a, c, d, e, f, h, i, j, k, l, m, n, p, q, r, s, t, u, w, x, y, z
The following has not yet been implemented, but will be eventually:
- Unimplemented commands: g, G, v, V
- does not (yet) support "loose" mode
- does not (yet) support "restricted" mode