lagdawg
09-05-2007, 09:46 AM
Hello,
I currently must access a Unix quite often and change to a certain directory.
I have aliased a command that takes me to that directory in my .cshrc. (This was set up by someone else and I just copied it for my use).
alias path1 'cd /patha/'
alias path2 'cd /pathb/'
alias goDir 'path1;path2;clear;ls'
As of recently this directory has become filled with alot of subdirectories and I would like to modify my alias command so that if I type "goDir" it takes me to the directory, but if I type "goDir subdir" it will take me directly to the sub directory.
I have tried:
alias goDir 'path1;path2;cd \!*;clear;ls'
That works if you specify a subdirectory but if you don't then it predictably just goes to your home folder.
Any help in solving this issue would be greatly appreciated. Thanks.
I currently must access a Unix quite often and change to a certain directory.
I have aliased a command that takes me to that directory in my .cshrc. (This was set up by someone else and I just copied it for my use).
alias path1 'cd /patha/'
alias path2 'cd /pathb/'
alias goDir 'path1;path2;clear;ls'
As of recently this directory has become filled with alot of subdirectories and I would like to modify my alias command so that if I type "goDir" it takes me to the directory, but if I type "goDir subdir" it will take me directly to the sub directory.
I have tried:
alias goDir 'path1;path2;cd \!*;clear;ls'
That works if you specify a subdirectory but if you don't then it predictably just goes to your home folder.
Any help in solving this issue would be greatly appreciated. Thanks.