1 |
Sérgio Almeida wrote: |
2 |
> On Fri, 2009-07-24 at 10:22 +0200, Michael Haubenwallner wrote: |
3 |
|
4 |
>>> if cmd = 'chdir': |
5 |
>>> uprofile |
6 |
|
7 |
>> ..., the automatism for the 'cd' command feels like more |
8 |
>> confusing than useful... |
9 |
|
10 |
> Atm, cd just changes dir as it is supposed to. Robert alerted us to the |
11 |
> fact that we can trigger a PRE_CMD on most shells when a CHANGEDIR |
12 |
> occurs. |
13 |
|
14 |
>> Instead, provide a command to update the environment for the current |
15 |
>> directory, which does search for an .uprofile/ in all the parent |
16 |
>> directories when there is no local one. |
17 |
>> Additionally, (let the user) define a *new* command that does both |
18 |
>> changing directory and updating the environment. |
19 |
>> |
20 |
> |
21 |
> This is the question... Call uprofile manually or detect the profile |
22 |
> automatically? Both capabilities? Mmm... |
23 |
|
24 |
I'd say leave it to the user to either use the CHANGEDIR event, |
25 |
or define some alias like 'ucd', or call 'uprofile' manually only. |
26 |
Eh - provide an uselect-module to select the variant... |
27 |
|
28 |
>> Another point: the per-directory profile solution feels like there is no |
29 |
>> need to distinguish between user- and directory-profile any more - as |
30 |
>> the user-profile would not be anything different than ~/.uprofile/, no? |
31 |
> |
32 |
> Yes and no. ~/.uselect/ contains a bin/ environment (prepended to your |
33 |
> PATH by /etc/profile or something) a env.d/ and most probabily |
34 |
> something else that gets executed uppon login. |
35 |
> |
36 |
> This does not invalidate you having a ~/.uprofile/. uprofile will |
37 |
> configure your ~/.uselect/ and your environment variables. Your user |
38 |
> profile will not be interpreted by python, uprofile turns profile files |
39 |
> (from python) into bin/ and env.d/ environment on your ~/.uselect. |
40 |
|
41 |
Ohw, there is .uselect/{bin,env.d}/ ... |
42 |
|
43 |
What about a per-directory .uselect/{bin,env.d}/ too? |
44 |
I'd like to set up the complete environment/profile for a development project, |
45 |
to completely take precedence over the users' environment/profile who are |
46 |
working on that project, to have something like this order: |
47 |
PATH=/my/project/.uselect/bin:/home/user/.uselect/bin:/etc/.uselect/bin:/usr/bin:/bin |
48 |
|
49 |
Maybe this already is how it works? |
50 |
|
51 |
> |
52 |
> This may seem confusing, but that's the best way I can explain. Later |
53 |
> this weekend will send a call for ideas/call for modules to the dev |
54 |
> list to get everyone known with the uselect environment. I'm just |
55 |
> finishing cleaning up the code to start commiting and using git |
56 |
> branches. |
57 |
|
58 |
Whenever I come to test uselect/uprofile, I'll do this in Gentoo Prefix |
59 |
on several platforms, not on my stable Gentoo Desktop... |
60 |
|
61 |
Thank you! |
62 |
|
63 |
/haubi/ |