1 |
On Monday 02 May 2011 12:52:12 Alex Schuster wrote: |
2 |
> Mick writes: |
3 |
> > On Monday 02 May 2011 11:26:27 you wrote: |
4 |
> > |
5 |
> > Thanks. Not sure if there is a difference between an env.d variable and |
6 |
> > a profile.d variable. |
7 |
> |
8 |
> None you will notice, both /etc/profile.env and scripts in /etc/profile.d/ |
9 |
> are sourced in /etc/profile. profile.env contains all stuff in /etc/env.d/ |
10 |
> after you ran env-update. |
11 |
|
12 |
Hmm ... I initially set up a file in /etc/profile.d/99editor with |
13 |
|
14 |
EDITOR="/usr/bin/vim" |
15 |
|
16 |
in it. Upon reboot I still got: |
17 |
|
18 |
echo $EDITOR |
19 |
/bin/nano |
20 |
|
21 |
So, I thought of moving it into /etc/env.d/97editor. Upon another reboot |
22 |
(troubleshooting network problems) I again found out that nano is my default |
23 |
editor ... neither locations seem to being read at boot time? |
24 |
|
25 |
Running env-update && source /etc/profile did not make any difference. |
26 |
|
27 |
Is the number prefix important? Does it have to be 99editor? If so, how does |
28 |
one discover the correct number for each variable? |
29 |
|
30 |
|
31 |
> I do not manually change things in env.d, but with 'eselect editor set <n>' |
32 |
> you can create a file /etc/env.d/99editor which will set the EDITOR |
33 |
> variable to the editor you gave eselect as argument. Enter eselect editor |
34 |
> list to se what's available, or just give the editor path as argument to |
35 |
> eselect. |
36 |
|
37 |
# eselect editor list |
38 |
Available targets for the EDITOR variable: |
39 |
[1] /bin/nano |
40 |
[2] /usr/bin/ex |
41 |
[3] /usr/bin/vi |
42 |
[ ] (free form) |
43 |
|
44 |
What does the "[ ] (free form)" above refer to? |
45 |
|
46 |
|
47 |
> > I've added mine to /etc/profile.d for now. I'll |
48 |
> > see what gives when I reboot. |
49 |
> |
50 |
> A relogin would be enough. Or '. /etc/profile' in the shell, this is what |
51 |
> eselects suggests to do. Or bash -l, or xterm -ls. |
52 |
|
53 |
Yep, setting the EDITOR using eselect works fine. |
54 |
|
55 |
-- |
56 |
Regards, |
57 |
Mick |