"This recent hint included a mention of how aliasing rm to rm -i messed up an installer. The way I've always avoided this problem is to place the following line at the top of my .cshrc file:
if (! $?prompt) exit
This causes the .cshrc commands to be skipped if the prompt shell variable is undefined. The prompt shell variable is only defined when the shell is interactive with a terminal."