I want to create a new instance of
tcsh and source an arbitrary script, all in one step. The problem is that when I use the
-c option, the shell instance closes as soon as the script is complete. So, in the following trivial example the
pushd command completes successfully but then the shell exits:
tcsh -c "pushd ~/some/directory/of/interest"
How can I source a script which modifies the environment and then work interactively within that environment? This is most useful when used in conjunction with programs like
screen, as in the following:
ssh -t user@host 'tcsh -c "source ~/test_environment.csh"'