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

John Arbash Meinel john at arbash-meinel.com
Wed May 3 22:20:49 BST 2006


Olaf Conradi wrote:
> On 03/05/06, Olaf Conradi <oohlaf at gmail.com> wrote:
>> On 03/05/06, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
>> > Olaf Conradi wrote:
>> > > Hi
>> > >
>> > > We should first try to invoke 'editor' to make use of the
>> alternatives
>> > > system present on Debian and derivatives (Ubuntu, etc).
>> >
>> > Shouldn't that be sensible-editor?
>>
>> Not according to debian-policy:
>> http://www.debian.org/doc/debian-policy/ch-customized-programs.html
> 
> Hmm, I misread that, the last line says:
> 
> A program may also use the VISUAL environment variable to determine
> the user's choice of editor. If it exists, it should take precedence
> over EDITOR. This is in fact what /usr/bin/sensible-editor does.
> 
> -Olaf
> 
> 

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

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.

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)

John
=:->




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060503/9c96a78e/attachment.pgp 


More information about the bazaar mailing list