posted 21 years ago
I first agreed to Carlos.
Since 'cd' is a build-in bash-command, I thought you have to modify the source of bash. (assuming you use bash as shell).
didn't work - It allways changed dir to
/home/satish
(ok - to be true: not satish in my case)
I first proved my assumtion, cd being a command and not an executable:
which cd
Then I proved cd not to be an alias for chdir or something using alias.
Then I looked at the man-page - generally a good idea: man bash
where I searched for cd. Surprise: I found a 'CDPATH'. (I never heard before). I told it
and made a cd Scripts from /var/tmp - and it worked.
I guess setting the CDPATH to /home/satish:. will be a better idea, and even better .:/home/satish.
Even command-completition works.
But perhaps you just don't know, that you may use cd ~/Scripts to change to the subdirectory in your home.