Sunday, September 13, 2009

Open iTerm here

As you probably know from my previous entries, I have upgraded to Snow Leopard, which, despite initial hurdles, led me to read and demand more of the operating system. Among the custom things that I missed from my old windows installation was a context menu allowing me to open a terminal window through an Explorer context menu pointed to a folder of interest. Recently I found the solution in another software developer's blog, which allows one to open a window of Terminal.app. I however, prefer the alternative (and open source) iTerm, and so I tried to simply change the name of the invocation within the code of the workflow I downloaded for the previous site. It turns out that it was not that simple, so ended up having to dig into a Mac hints forum to find the code that finally did what I wanted. And the result of that is my very own version of that script, which I call, Open iTerm Here. I do not guarantee it will work, even though it has worked in my Snow Leopard installation. It includes installation instructions, which are basically the following: open the zip file, go into the open-here folder, and copy Open iTerm Here.workflow to ~/Library/Services.

2 comments:

dty said...

Thanks for the post. It finally got me what I wanted after quite a while searching and hacking code around trying to achieve this very functionality.

Here is the summary how it works on my end:

* OS X 10.5.8
* Create or enhance the posted workflow in Automator:
* Add one more action before the current one, that is, add a "Get Seleted Items" action before the current "Run AppleScript" action.
* Save as an "Application" in ~/Applications.
* Drag the new app to Finder's ToolBar.

Now can get to a new iTerm tab in the selected directory by clicking on the icon on the Finder's ToolBar.

Thanks again.

Felipe said...

I'm glad it was useful to you, and indeed I like your tip, I will definitely try it out here on my end!