Welche Ubuntu-Programme benutzen die Umgebungsvariable EDITOR?

Florian Diesch diesch at spamfence.net
Mon Dez 8 14:19:14 GMT 2008


Detlef Lechner <Detlef.Lechner at gmx.net> wrote:

> Hallo Liste,
>
> Welche Ubuntu-Programme benutzen die Umgebungsvariable EDITOR? (siehe
> man environ)
> '~$ echo $EDITOR' erzeugt keine Ausgabe.


Ubuntu folgt da der Debian-Policy
<http://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.4>:

--8<---------------cut here---------------start------------->8---
11.4 Editors and pagers

Some programs have the ability to launch an editor or pager program to
edit or display a text document. Since there are lots of different
editors and pagers available in the Debian distribution, the system
administrator and each user should have the possibility to choose
their preferred editor and pager.

In addition, every program should choose a good default editor/pager
if none is selected by the user or system administrator.

Thus, every program that launches an editor or pager must use the
EDITOR or PAGER environment variable to determine the editor or pager
the user wishes to use. If these variables are not set, the programs
/usr/bin/editor and /usr/bin/pager should be used, respectively.

These two files are managed through the dpkg "alternatives"
mechanism. Thus every package providing an editor or pager must call
the update-alternatives script to register these programs.

If it is very hard to adapt a program to make use of the EDITOR or
PAGER variables, that program may be configured to use
/usr/bin/sensible-editor and /usr/bin/sensible-pager as the editor or
pager program respectively. These are two scripts provided in the
Debian base system that check the EDITOR and PAGER variables and
launch the appropriate program, and fall back to /usr/bin/editor and
/usr/bin/pager if the variable is not set.

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.

It is not required for a package to depend on editor and pager, nor is
it required for a package to provide such virtual packages.[74]
--8<---------------cut here---------------end--------------->8---



   Florian
-- 
<http://www.florian-diesch.de/>
-----------------------------------------------------------------------
**  Hi! I'm a signature virus! Copy me into your signature, please!  **
-----------------------------------------------------------------------