Fastest way to change current directory
I'm tired to each time write following commands:
$ cd ~/work/rails/project_name
# or
$ cd ~/work/git/repo_name
And I write tiny and useful function for zsh:
~ $ work rails project_name
~/work/rails/artemeff $
# or
~ $ work git repo
~/work/git/repo $
Function code:
function work() {
cd ~/work
for key in $*; do
cd $key
done
}
Written by Yuri Artemev
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#