Andrew Moore wrote:
Do you mean executing at startup a '.n', '.l', or '.p' command when
setting the current line in the command line, or something else?

Yes, execute a `p' command (and only that) after setting dot when ed
is invoked with the command-line option `+N' or '+/RE/' or `+?RE?'.
And specifically, do not re-print the line number or search command:

I don't like the idea of printing random unsolicited text at startup. The line printed may be long, may be empty, may not exist (if the file is empty), or may contain confusing text resembling an error message or a byte count. And it may be even worse if ed is invoked indirectly and "the user doesn't see '+4'".

It would be better to print an informative message like "Starting at line 4", "Moving to line 4", or "Current line set to 4".

Reply via email to