May 08, '03 09:09:00AM • Contributed by: robg
macosxhints.com reader Impatient1 sent in a script to automate this process, but I had some trouble making it work while testing the hint ... so I posted it to this thread on the forum site, asking for assistance. After a few back and forths, reader Paul McCann took what was a 20 line program and turned it into four simple lines of code:
#!/bin/sh osascript <<END tell app "Terminal" to do script "cd \"`pwd`\"" ENDJust create this script somewhere on your path (I called it nt, for new term), set it to executable with chmod 755 nt, type rehash to add it to the list of known programs, and you're done.
Now, whenever you need a new Terminal window set to the current Terminal window's active directory, just type nt and you've got one! Thanks to Paul and the others who contributed to the thread for finding such a simple solution!
