1

After starting ed, help mode can be enabled using the H command. Is there a way to enable help mode by default, so that I do not have to type H every time I use ed?

Flux
  • 2,938

1 Answers1

3

With standard ed, you will have to enter H manually at the start of an interactive editing session, or include H at the start of any ed editing script.

The OpenBSD ed manual suggests this for ed scripts:

H
Toggles the printing of error explanations. By default, explanations are not printed. It is recommended that ed scripts begin with this command to aid in debugging.

The GNU ed implementation has a command line option, -v (or --verbose), which enables H in the editing session. You may alias ed to ed -v if you want this to be the default behavior.

-v, --verbose
be verbose; equivalent to the H command

Kusalananda
  • 333,661