- 论坛徽章:
- 0
|
In c shell (.cshrc), I am using two important aliases: cd dirtory and back to previous directory:
alias cd 'set old=$cwd; chdir \!*; ls ; set prompt=$cwd \! > '
alias back 'set back=$old; set old=$cwd; cd $back; unset back; dirs'
I tried to convert these two alias in B shell (.bashrc) but can not make it work:
alias cd 'old=`pwd`; echo $*; pushd $1; ls; ps1=`pwd`'
The problem is the argument $1, which is not recognized (empty).
How to pass an argument (directory name in this example) as it did in C shell (\!*)?
How to make these two aliases work under B shell?
Please help. |
|