Bash scripting: change current Rails application directory

Put this in ~/.bashrc: ```bash app () { cd "/var/www/$*/current"; } ``` Execute: ```bash . ~/.bashrc ``` Now you can change to another Rails app directory like this: ```bash app xxx.com ```