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

Lennart Poettering lennart at poettering.net
Mon Oct 20 16:05:10 PDT 2014


On Mon, 13.10.14 15:13, Simon McVittie (simon.mcvittie at collabora.co.uk) wrote:

> 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? :-)

I am really not sure we should expose such an API from
systemd. However, I do agree that the algorithm sensible-editor
exposes is reasonable enough so that we should mimic it to a certain
degree, and use as built-in logic. And I figure Ronny's code is
already pretty close to that.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list