[PATCH] Very trival patch to make use of alternatives system

Olaf Conradi oohlaf at gmail.com
Wed May 3 22:25:28 BST 2006


On 03/05/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
> It depends on which one you are using.
> /usr/bin/editor => /etc/alternatives/editor => /usr/bin/nano on my
> system. (Any way to change that to vim?)

run update-alternatives --config editor

> while
> /usr/bin/sensible-editor
> Just pays attention to the env variables VISUAL and then EDITOR, and
> then seems to call nano, nano-tiny, or vi.

Not quite,
It first checks VISUAL and tries to invoke that
then it checks EDITOR, if EDITOR was empty it defaults that to
"editor" (which is the alternatives system one)

If it can't invoke EDITOR, it tries nano, vi, etc...

> So 'editor' will be whatever is setup by the alternatives system. It
> sounds like a better one to use than 'sensible-editor' since we are
> already doing it. (And we probably don't want VISUAL)

So I think sensible-editor is preferred.

 -Olaf




More information about the bazaar mailing list