Ben Schmidt <[EMAIL PROTECTED]> writes: >>> You should probably solve this by putting your alteration to path in >>> ~/.login (or ~/.csh.login?) instead of ~/.cshrc so it only happens for a >>> login shell, not every shell, since you actually want non-login shells >>> to inherit the environment from their parent process. Even better would >>> be to have it as an alteration to the system default path in ~/.login >>> (i.e. prepend or append to the existing $PATH rather than setting it >>> outright). >> >> I notice that when on linux, it hasn't such problem in bash, maybe it's >> a problem relative to tcsh? But I'm sorry I can't test it at this time >> :( > > You would have the same problem in bash if you did the same thing in > your .bashrc. > >> I just want an env implemented in a particular shell in one particular >> screen window, so the ~/.login isn't what I need. > > Yes, I understand. I'm not suggesting you put your context path in > .login, I'm suggesting you move > >> set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin >> /usr/local/bin $HOME/bin) > > from .cshrc to .login. > > The problem is that when Vim does :! it starts tcsh, which reads .cshrc, > which runs that line above which sets the path so it loses the path the > Vim had that included the context path. > > Just removing that line above from your .cshrc should fix it, but > obviously that's not what you want. Nor do you want to change that line > to something that includes $PATH on its right hand side, because doing > that would mean the path would get longer and longer every subshell that > got started (and many do!). The best thing is to put it in .login.
Hmm, it solves the problem, I think I tested in bash without the .bashrc that contents path setting line, so no such problem. Many thanks for patient and detailed explanation :) > > Ben. > > > > > > > -- Regards, anhnmncb gpg key: 44A31344 --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
