Sérgio Almeida wrote: > On Fri, 2009-07-24 at 10:22 +0200, Michael Haubenwallner wrote:
>>> if cmd = 'chdir': >>> uprofile >> ..., the automatism for the 'cd' command feels like more >> confusing than useful... > Atm, cd just changes dir as it is supposed to. Robert alerted us to the > fact that we can trigger a PRE_CMD on most shells when a CHANGEDIR > occurs. >> Instead, provide a command to update the environment for the current >> directory, which does search for an .uprofile/ in all the parent >> directories when there is no local one. >> Additionally, (let the user) define a *new* command that does both >> changing directory and updating the environment. >> > > This is the question... Call uprofile manually or detect the profile > automatically? Both capabilities? Mmm... I'd say leave it to the user to either use the CHANGEDIR event, or define some alias like 'ucd', or call 'uprofile' manually only. Eh - provide an uselect-module to select the variant... >> Another point: the per-directory profile solution feels like there is no >> need to distinguish between user- and directory-profile any more - as >> the user-profile would not be anything different than ~/.uprofile/, no? > > Yes and no. ~/.uselect/ contains a bin/ environment (prepended to your > PATH by /etc/profile or something) a env.d/ and most probabily > something else that gets executed uppon login. > > This does not invalidate you having a ~/.uprofile/. uprofile will > configure your ~/.uselect/ and your environment variables. Your user > profile will not be interpreted by python, uprofile turns profile files > (from python) into bin/ and env.d/ environment on your ~/.uselect. Ohw, there is .uselect/{bin,env.d}/ ... What about a per-directory .uselect/{bin,env.d}/ too? I'd like to set up the complete environment/profile for a development project, to completely take precedence over the users' environment/profile who are working on that project, to have something like this order: PATH=/my/project/.uselect/bin:/home/user/.uselect/bin:/etc/.uselect/bin:/usr/bin:/bin Maybe this already is how it works? > > This may seem confusing, but that's the best way I can explain. Later > this weekend will send a call for ideas/call for modules to the dev > list to get everyone known with the uselect environment. I'm just > finishing cleaning up the code to start commiting and using git > branches. Whenever I come to test uselect/uprofile, I'll do this in Gentoo Prefix on several platforms, not on my stable Gentoo Desktop... Thank you! /haubi/