[systemd-devel] [PATCH v3] systemctl: add edit verb

Lennart Poettering lennart at poettering.net
Wed Oct 22 02:13:33 PDT 2014


On Wed, 22.10.14 11:10, Christian Seiler (christian at iwakd.de) wrote:

> Am 2014-10-22 10:36, schrieb Lennart Poettering:
> >>We can do this for the pager because there is no arguments to give,
> >>here we have a list of paths.
> >
> >THinking about this: are all those editors actually fine with editing
> >multiple files at once? is nano?
> 
> I know for certain that nano, vim, emacs, joe, kwrite and gedit
> support multiple files on the command line (and switching between
> them). Therefore, I don't think that will be an issue.
> 
> The biggest problem I see with this is more the fact that you don't
> immediately recognize that multiple files are open (and not just in
> nano, some other editors suffer from the same problem). But calling
> it mutliple times in sequence is even worse, since then you can't
> even switch between files and suspend (Ctrl-Z) will probably do some
> really weird stuff.
> 
> What about the following?
> 
>  - if there is only one file: call the editor just with the one
>    file
>  - if there is more than one file: create a temporary file in /tmp
>    (that will be deleted afterwards) that contains a list of all
>    files that are opened by the editor + some explanation text
>    (like git/svn/... commit message hints) and put that in front
>    of the list of files that are to be edited.

Sounds OK to me, but then again, it was the user who invoked the
command line, he should have known what he did... But anyway, sounds
OK anyway, but probably just the cherry on top to add in a later
patch!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list