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

Daniel Buch boogiewasthere at gmail.com
Tue Oct 14 12:48:34 PDT 2014


My general understanding is equal to dale. But with some consideration it
led me to agree with the warning approach. Its no big deal setting EDITOR.
Den 14/10/2014 01.06 skrev "Ronny Chevalier" <chevalier.ronny at gmail.com>:

> 2014-10-13 16:13 GMT+02:00 Simon McVittie <simon.mcvittie at collabora.co.uk
> >:
> > On 13/10/14 14:38, Dale R. Worley wrote:
> >> My general understanding is that the traditional behavior when "you
> >> need an editor but the user hasn't specified one" is to use "vi", and
> >> so people who don't want "vi" *always* set $VISUAL in their
> >> environment.
> >
> > The Right Thing™ is distro-specific. Debian and its derivatives have
> > sensible-editor(1) which is a shell script that uses $VISUAL, $EDITOR,
> > nano[1] or vi; I would expect systemd in Debian to use sensible-editor
> > as its fallback, either via a configure option or a patch.
> >
> > In distros without sensible-editor, I'm tempted to say the solution is
> > "stop being a distro without sensible-editor". New systemd API? :-)
> >
> Before I resend the patch, we should agree on what to do here, for me
> it makes more sense to raise an error asking to set either EDITOR or
> SYSTEMD_EDITOR than running vi or a "sensible-editor" like you said.
> Because, someone used to its editor will quit vi or "sensible-editor"
> and will try to find out how to set the editor for systemctl (Even if
> it is well known for EDITOR or VISUAL, some people don't set these
> variables).
>
> If we raise an error, someone not used to these variables but having a
> favorite editor will know how to change this. And if this person does
> not have a favorite editor and never used one (unlikely but I think
> this is the purpose of the sensible-editor ?), we can advice to set
> EDITOR to nano or an equivalent.
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141014/02ed621b/attachment.html>


More information about the systemd-devel mailing list