Title: Enhanced Open Terminal Here, for Leopard
Open Terminal Here
is an AppleScript by Marc Liyanage which allows to open a new Terminal window and `
cd` to the current Finder location by a mere click. This is delightful for heavy Terminal users. Now that Leopard's Terminal finally has tabs there has been a modification of the original script to take advantage of those when your front-most shell is busy (running
vi). Better integration with the Finder also showed through better icons.
However I still did not find the ease I had with OnMyCommand and iTerm scripts: with a right click I could open a new window or a new tab, in the current or in the parent directory. Using those scripts in Leopard was less than ideal since the menu of OnMyCommand is buried under the "More" item in the Finder's contextual menu and the scripts had to be rewritten for Apple's Terminal which is more robust than iTerm. So I decided to improve on all the work other already did and modify Open Terminal Here. Using a method wonderfully described by jobu at MacScripter I was able to detect key-down events when at the start of the application and used them to modify the behavior of the script. Now:
cdcommand in the frontmost Terminal window if it is not busy. Other wise it opens a new winddow/tab (depending on the state of ⌘)