1 |
On Fri, 2009-07-24 at 10:22 +0200, Michael Haubenwallner wrote: |
2 |
> Sérgio Almeida wrote: |
3 |
> > On Thu, 2009-07-23 at 17:28 +0200, Robert Buchholz wrote: |
4 |
> >> On Thursday 23 July 2009, Sérgio Almeida wrote: |
5 |
> >>> You changedir, you call uprofile, and |
6 |
> >>> voila, new profile. You login again, default profile. |
7 |
> |
8 |
> ..., change back to your home dir, call uprofile, and you have your |
9 |
> default (=login) environment. |
10 |
> |
11 |
|
12 |
Indeed... that's what's supposed to happen. Who wants to call uprofile? |
13 |
Who doesn't? |
14 |
|
15 |
> > if cmd = 'chdir': |
16 |
> > uprofile |
17 |
> |
18 |
> > What do you guys think? |
19 |
> |
20 |
> While the per-directory profile sounds interesting and useful (a really |
21 |
> good idea!), as it might solve the requirement for per-project |
22 |
> environment here, the automatism for the 'cd' command feels like more |
23 |
> confusing than useful: "WTF does 'cd' more than change directory?" |
24 |
> |
25 |
|
26 |
Atm, cd just changes dir as it is supposed to. Robert alerted us to the |
27 |
fact that we can trigger a PRE_CMD on most shells when a CHANGEDIR |
28 |
occurs. |
29 |
|
30 |
> Instead, provide a command to update the environment for the current |
31 |
> directory, which does search for an .uprofile/ in all the parent |
32 |
> directories when there is no local one. |
33 |
> Additionally, (let the user) define a *new* command that does both |
34 |
> changing directory and updating the environment. |
35 |
> |
36 |
|
37 |
This is the question... Call uprofile manually or detect the profile |
38 |
automatically? Both capabilities? Mmm... |
39 |
|
40 |
> Another point: the per-directory profile solution feels like there is no |
41 |
> need to distinguish between user- and directory-profile any more - as |
42 |
> the user-profile would not be anything different than ~/.uprofile/, no? |
43 |
> |
44 |
|
45 |
Yes and no. ~/.uselect/ contains a bin/ environment (prepended to your |
46 |
PATH by /etc/profile or something) a env.d/ and most probabily |
47 |
something else that gets executed uppon login. |
48 |
|
49 |
This does not invalidate you having a ~/.uprofile/. uprofile will |
50 |
configure your ~/.uselect/ and your environment variables. Your user |
51 |
profile will not be interpreted by python, uprofile turns profile files |
52 |
(from python) into bin/ and env.d/ environment on your ~/.uselect. |
53 |
|
54 |
This may seem confusing, but that's the best way I can explain. Later |
55 |
this weekend will send a call for ideas/call for modules to the dev |
56 |
list to get everyone known with the uselect environment. I'm just |
57 |
finishing cleaning up the code to start commiting and using git |
58 |
branches. |
59 |
|
60 |
> |
61 |
> Thank you! |
62 |
> |
63 |
|
64 |
I thank you! All! Have a nice weekend! |
65 |
|
66 |
> |
67 |
> /haubi/ |
68 |
> |
69 |
|
70 |
Cheers, |
71 |
Sérgio |
72 |
-- |
73 |
Sérgio Almeida - mephx.x@×××××.com |
74 |
mephx @ freenode |