Copying working directories
I use this nifty trick in OSX to copy the working directory of one term window to the others.
In the working term window:
pwd | pbcopy
In the term windows you wish to change the directory to the targeted working directory:
cd `pbpaste`
Note that this will only work if you don't copy something into OSX's clipboard before pasting.
To make life simpler for myself, I aliased these commands.
alias cpwd='pwd | pbcopy'
alias ppwd='cd `pbpaste`'
You must use single quotes if you alias these commands; double quotes will cause the inline execution to execute when the command is being aliased.
Written by Anthony Sutardja
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Osx
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#