I do a lot of command line work, which involves a lot of folder navigation with cd
.
To make my life easier, I'd love to be able to right-click on a folder in Finder and have a context menu item I could click that simply opens Terminal and cd
s to that directory.
How would I go about this in OS X (Snow Leopard)? I'm a website developer, so familiar with programming languages and computer literate, so feel free to get technical with me.
Best Answer
If you want the
cd
command in a new window or tab, you can simply turn on the built-in services, "New Terminal at Folder" and "New Terminal Tab at Folder", by going toSystem Preferences > Keyboard > Keyboard Shortcuts > Services > Files and Folders
.If you want the
cd
command in the active window or tab, you can make a simple Automator Service.folders
.Replace
(* Your script goes here *)
with the following:Save the service with whatever name you want your menu item to have, then it's ready to go.
An alternative to using a contextual menu is to just type
cd
(with a trailing space) then drag the folder to the Terminal window.