Hi Antonio,

> > One suggestion: it might be helpful, in addition to setting dot, to
> > print dot. In the particular case of `systemctl edit`, the user
> > doesn't manually invoke `ed +4 ...', so it's easy to assume that dot
> > is at the end of file.  Even printing a blank line in this case can
> > be a helpful reminder.
>
> Do you mean executing at startup a '.n', '.l', or '.p' command when
> setting the current line in the command line, or something else?

The release notes said:

    New command-line options '+line', '+/RE', and '+?RE'...

If the new + option was a way to give general commands then ‘+42’ would
already print line 42 just as if it were the first command I entered.
It would also allow ‘+42n’ or ‘+/RE/l’, for example.  Perhaps this would
be more generally useful.  Multiple + options would be processed in
order.

But it wouldn't match the silent ex(1) behaviour when given just a line
number.  However, I consider that an anomaly given ex's other behaviour.

    $ ex +3 $f
    "/etc/passwd" [readonly] 69L, 3872B
    :q
    $

    $ ex +3p $f
    "/etc/passwd" [readonly] 69L, 3872B
    bin:x:2:2:bin:/bin:/usr/sbin/nologin 
    :q
    $

    $ ex +3l $f
    "/etc/passwd" [readonly] 69L, 3872B
    bin:x:2:2:bin:/bin:/usr/sbin/nologin$ 
    :q
    $

    $ ex +1 +/^bin/l +q $f
    "/etc/passwd" [readonly] 69L, 3872B
    bin:x:2:2:bin:/bin:/usr/sbin/nologin$
    $ 

I suggest giving consideration to making +... be a general way to give
commands as options.  ‘+q +q’ would naturally stop further commands from
options or stdin.

-- 
Cheers, Ralph.

Reply via email to