on 05/02/2011 01:05 PM Mick wrote the following:
> Another thing I found, is some incongruity about the file in which the 
> $EDITOR 
> and $PAGER should be defined.
>
> The migration guide says:
>
> "The EDITOR variable is no longer found in /etc/rc.conf. Both EDITOR and 
> PAGER 
> are set by default in /etc/profile. You should change this as needed in your 
> ~/.bashrc (or equivalent) file or create */etc/env.d/99editor* and set the 
> system default there."
>
> On the other hand the /etc/profile file seems to recommend /etc/profile.d/
>
> "# You should override these in your ~/.bashrc (or equivalent) for per-user
> # settings.  For system defaults, you can add a new file in /etc/profile.d/.
> export EDITOR=${EDITOR:-/bin/nano}
> export PAGER=${PAGER:-/usr/bin/less}"
>
> Which one is the authoritative place to define a system wide editor?
All above are consistent. The system default is set in a file like
/etc/env.d/99editor
I use eselect (app-admin/eselect) to set the system defaults.
eg I have:
# cat /etc/env.d/99editor
# Configuration file for eselect
# This file has been automatically generated.
EDITOR="/usr/bin/vi"
VISUAL="/usr/bin/vi"

But on a per user basis, a user should define those environment
variables in his ~/.bashrc or ~/.bash_profile (or equivalent) shell
initialization files.

Reply via email to