Re-establishing ~/Library/init/tcsh functionality

Aug 26, '02 12:38:06AM

Contributed by: robg

Like many others, I was very surprised that OS X 10.2 seemed to break all my aliases and paths that I had so carefully setup according to Apple's recommendations in 10.1 -- I had created a folder in ~/Library/init/tcsh and stored path, aliases.mine and rc.mine there.

When I upgraded to 10.2, they all failed to work. After a bit of experimentation, I found that I could make everything work again by sticking it all in a .tcshrc file in my home directory. But this seemed less than elegant.

A bit more digging, however, revealed a very simple (and much more elegant!) solution. Read the rest of the article for the details...

It turns out that the files which used to live at:

/usr/share/init/tcsh
have been moved to:
/usr/share/tcsh/examples/
With this change in path, the startup scripts fail to read the ~/Library/init/tcsh files. The README file in the examples directory gives the simple solution:
This directory contains some useful tcsh files. In order to use this configuration:
 % echo "source /usr/share/tcsh/examples/rc"     > ~/.tcshrc
% echo "source /usr/share/tcsh/examples/login" > ~/.login
% echo "source /usr/share/tcsh/examples/logout" > ~/.logout
To do this system-wide, do the same instead to /etc/csh.cshrc, /etc/csh.login, and /etc/csh.logout.
Once I ran the three "source" commands, my previously defined prompt, shortcuts and paths were back to normal.

This might have been the most popular hint submission of the opening Jaguar weekend; I think I received variations on the above from at least five different people. So if I managed to get some of the details wrong, or you disagree with my methodology (hey, it worked for me!), please post your comments.

Comments (24)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020826003806202