<div dir="ltr"><p dir="ltr">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.</p>
<div class="gmail_quote">Den 14/10/2014 01.06 skrev "Ronny Chevalier" <<a href="mailto:chevalier.ronny@gmail.com" target="_blank">chevalier.ronny@gmail.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">2014-10-13 16:13 GMT+02:00 Simon McVittie <<a href="mailto:simon.mcvittie@collabora.co.uk" target="_blank">simon.mcvittie@collabora.co.uk</a>>:<br>
> On 13/10/14 14:38, Dale R. Worley wrote:<br>
>> My general understanding is that the traditional behavior when "you<br>
>> need an editor but the user hasn't specified one" is to use "vi", and<br>
>> so people who don't want "vi" *always* set $VISUAL in their<br>
>> environment.<br>
><br>
> The Right Thing™ is distro-specific. Debian and its derivatives have<br>
> sensible-editor(1) which is a shell script that uses $VISUAL, $EDITOR,<br>
> nano[1] or vi; I would expect systemd in Debian to use sensible-editor<br>
> as its fallback, either via a configure option or a patch.<br>
><br>
> In distros without sensible-editor, I'm tempted to say the solution is<br>
> "stop being a distro without sensible-editor". New systemd API? :-)<br>
><br>
Before I resend the patch, we should agree on what to do here, for me<br>
it makes more sense to raise an error asking to set either EDITOR or<br>
SYSTEMD_EDITOR than running vi or a "sensible-editor" like you said.<br>
Because, someone used to its editor will quit vi or "sensible-editor"<br>
and will try to find out how to set the editor for systemctl (Even if<br>
it is well known for EDITOR or VISUAL, some people don't set these<br>
variables).<br>
<br>
If we raise an error, someone not used to these variables but having a<br>
favorite editor will know how to change this. And if this person does<br>
not have a favorite editor and never used one (unlikely but I think<br>
this is the purpose of the sensible-editor ?), we can advice to set<br>
EDITOR to nano or an equivalent.<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div>
</div>