Terminal at My Fingertips

August 19th, 2005

If you’re like me, you take great comfort in the presence of the Terminal in Mac OS X. I love a great GUI, but the fact is that many tasks on the Mac are still best accomplished from the behind the wheel of a shiny new pseudo-tty.

Usually I get the need for command-line access to an object just as I’m browsing near it in the Finder. In the bad old days, I would laboriously open the Terminal, type “cd “, then drag a copy of the item I’m interested in to the Terminal, and if it was a file, torturously edit out the leaf-name part of the path before hitting return!

Grr! I’m getting stressed out just thinking about it! Things have gotten better for me since I sat down and wrote a handy script to accomplish all of this for me. My Terminal At Location script does just what its title implies: opens a new terminal window with the current path set to the object of your current Finder-fixation. You can download this script from the Red Sweater AppleScript Page.

I have this script configured as an application-specific keyboard shortcut for the Finder. Whenever I need to “switch to command-line mode” I just hit Cmd-Shift-T and I’m off-and-running. If you don’t already have an application-specific keyboard shortcut tool for quickly running AppleScripts, then allow me to give my unbiased (ahem) endorsement of FastScripts. Create a Finder-specific scripts folder, drop the script in, and select it from the FastScripts menu while holding down the Cmd key to quickly set your desired shortcut.

If you spend a lot of time switching between the Finder and the Terminal, you will not forgive yourself for failing to set up a script like this sooner.

Update:Version 1.0.1 of the script fixes a bug that caused terminal parsing errors for paths with funny characters in them.

4 Responses to “Terminal at My Fingertips”

  1. Simone Manganelli Says:

    Don’t mind me! Just wanted to add a note that this too is VERY useful for me. Thanks a bunch!

    – Simone

  2. Daniel Jalkut Says:

    It really cheers me up to learn that people out there are finding this stuff useful. Thanks for posting.

  3. Jon Maddox Says:

    Excellent!

  4. Matthew Says:

    Other options for using this timesaving script:

    Put it in your scripts folder (~/Library/Scripts/Applications/Finder/) or put it somewhere indexed by the incomparable Quicksilver. (http://quicksilver.blacktree.com/)

Comments are closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.