On Monday 02 May 2011 12:52:12 Alex Schuster wrote:
> Mick writes:
> > On Monday 02 May 2011 11:26:27 you wrote:
> > 
> > Thanks.  Not sure if there is a difference between an env.d variable and
> > a profile.d variable.
> 
> None you will notice, both /etc/profile.env and scripts in /etc/profile.d/
> are sourced in /etc/profile. profile.env contains all stuff in /etc/env.d/
> after you ran env-update.

Hmm ... I initially set up a file in /etc/profile.d/99editor with 

EDITOR="/usr/bin/vim" 

in it.  Upon reboot I still got:

echo $EDITOR
/bin/nano

So, I thought of moving it into /etc/env.d/97editor.  Upon another reboot 
(troubleshooting network problems) I again found out that nano is my default 
editor ... neither locations seem to being read at boot time?

Running env-update && source /etc/profile did not make any difference.

Is the number prefix important?  Does it have to be 99editor?  If so, how does 
one discover the correct number for each variable?


> I do not manually change things in env.d, but with 'eselect editor set <n>'
> you can create a file /etc/env.d/99editor which will set the EDITOR
> variable to the editor you gave eselect as argument. Enter eselect editor
> list to se what's available, or just give the editor path as argument to
> eselect.

# eselect editor list
Available targets for the EDITOR variable:
  [1]   /bin/nano
  [2]   /usr/bin/ex
  [3]   /usr/bin/vi
  [ ]   (free form)

What does the "[ ]   (free form)" above refer to?


> > I've added mine to /etc/profile.d for now.  I'll
> > see what gives when I reboot.
> 
> A relogin would be enough. Or '. /etc/profile' in the shell, this is what
> eselects suggests to do. Or bash -l, or xterm -ls.

Yep, setting the EDITOR using eselect works fine.

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to