Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two .cshrc.user files for two different projects. For example, they set the same environment variables but with different values.

When I'm currently switching between projects, I run a python script which copies in the correct .cshrc.user file to my home folder before I open a new terminal window.

Is there a more convenient way of doing this?

share|improve this question

You can specify an rc file for csh to invoke after the usual ones (that is, /etc/csh.{chsrc,login} and $HOME/{.cshrc,.login}) with the -m flag. You could keep all the shared configuration in .cshrc and move the project-specific things to their own rc files, and just start a new csh session from within your existing one whenever you want to work on your project like so:

exec csh -m .cshrc.project1

This has the added advantage that project-specific variables don't get in the way during your regular shell use. The downside is that you'll need to do this in every new terminal window. How much of a pain that is depends on your workflow.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.