ALIASES sourcing .cshrc file

i would like to know how to setup an alias that will go from the current directory to home dir and source the .cshrc file and return to the original working directory

eg.
I'm in /Home/MyDirectory

to source, I need to go to the /Home directory

and then I want to go back to /Home/MyDirectory automatically.
ShannonBoyAsked:
Who is Participating?
 
vulkanrConnect With a Mentor Commented:
what's wrong with : alias x "source ~/.cshrc" ??

anyway, if this was not the meaning, try:
alias x "(cd ; source .cshrc)"

the ( ) will cause the commands to run under the same process and when it terminates you will get back where you were.
0
 
ozoCommented:
alias setup 'pushd /Home;source .cshrc;popd'
0
 
ShannonBoyAuthor Commented:
ozo your comment doesnt work sorry...

but vulkanr solved it excellent, thank bud!!!
0
All Courses

From novice to tech pro — start learning today.