[systemd-devel] [PATCH v3] systemctl: add edit verb
Christian Seiler
christian at iwakd.de
Wed Oct 22 02:10:14 PDT 2014
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.
Christian
More information about the systemd-devel
mailing list