07 Oct 2016
Open iTerm2 Here Context Menu option for Finder.
One of the things I miss most from using Ubuntu is the ability to open the terminal from any directory. Instead of cd-ing down a long directory path you can add an Open iTerm Here option to Finder’s context menu (right click) for easy directory access to terminal.
1) Open up Automator and create a new file and select Services as your document type.
2) For the Service recieves selected field, select Folders.
3) Drag Run Applescript onto the right hand window to add some of the AppleScript code that will power the service.
4) Paste the following code:
5) Hit Command+S to save the service. Whichever name you save it under will appear in the context menu when you right click on a folder. 6) Right click on any finder folder and click Open in iTerm2! Voila!
The context menu will only appear when you right click on a folder. Unfortunately that means if you’re already in a folder, you cannot open the iTerm in that location. You’ll have to go up a directory level and open the context menu from there.