Is there any way to source some other cshrc conditionally
am 11.10.2007 09:02:01 von parag_paulI want to spawn a new shellm but the .cshrc should be diff,
Is that cs -rc
Please help me here
I want to spawn a new shellm but the .cshrc should be diff,
Is that cs -rc
Please help me here
In article <1192086121.021862.107550@o80g2000hse.googlegroups.com>,
"parag_paul@hotmail.com"
> I want to spawn a new shellm but the .cshrc should be diff,
>
> Is that cs -rc
>
> Please help me here
Start the shell with the -f option to prevent sourcing .cshrc, then use
"source filename" to source the one you want to use instead.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Also
is it possible to divide a .login section for interactive login for
sourcing only the alias files
The method you told was a known solution but I wanted to source only
the aliases
parag_paul@hotmail.com wrote:
> Also
> is it possible to divide a .login section for interactive login for
> sourcing only the alias files
>
> The method you told was a known solution but I wanted to source only
> the aliases
>
# skip remaining setup if not an interactive shell
if ( ! $?prompt ) exit
# another method
/usr/bin/test -t 0
if ( ! $status ) then
echo "terminal attached - this is usually interactive"
endif
--
Michael Tosch @ hp : com
"parag_paul@hotmail.com"
> Also
> is it possible to divide a .login section for interactive login for
> sourcing only the alias files
I use, in my ~/.cshrc file
if ( ! ( $?USER && $?prompt && $?TERM )) exit
# Only do this in interactive shells
if ( -f ~/.aliases ) source ~/.aliases
You don't want it in your .login file, because you want new
shell/windows to also define aliases.