When working with Rails on my Mac OS X machine, I often find myself opening a lot of terminal tabs. Unfortunately I then need to navigate to the same directory as the other tabs. It's a big pain. Fortunately superuser.com has a solution.
Create a new file in "/usr/local/bin" named "nt"
#!/bin/bash
osascript -e 'tell application "Terminal"' \
-e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' \
-e "do script with command \"cd `pwd`;clear\" in selected tab of the front window" \
-e 'end tell' &> /dev/null
Then set its executable bit. "chmod +x /usr/local/bin/nt"
That's it!
If you made it this far, you should follow me on Twitter.
-JP
Want to test-drive Bitcoin without any risk? Check out my bitcoin wallet Coinbolt. It includes test coins for free.
comments powered by Disqus