Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Open terminal in a given directory System
It's been noted here before that holding down command-option and dragging an item to the dock will force an application to try to open whatever you drop on it.

Tonight, I noticed a really cool variant on that trick. If you'd like to open a new terminal window in a given directory, simply drag that folder to the Terminal icon in the dock while holding down command-option. Terminal will open a new window, leaving any that you have alone, and 'cd' into the folder that you dropped on it. The first line you see is your prompt with the path showing that you're in the directory you dropped! I love the subtle niceties in X!
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)

Open terminal in a given directory | 2 comments | Create New Account
Click here to return to the 'Open terminal in a given directory' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Open terminal in a given directory
Authored by: kcamera on Jul 25, '03 05:00:06PM

I know this hint is from a very long time ago... but I just tried it out on Jaguar 10.2.6 and it doesn't work. A new terminal window pops up, but it stays in the home directory.

Ironically, if I do the Cmd-Opt-drag while terminal is *not* running, it opens up two new windows (both in the home directory)! I would imagine this is unwanted behavior, i.e. bug.

Also, in this version of terminal, the window itself is a hotspot to drop folders, but it only inserts the path to the folder, and doesn't automatically 'cd' or fire up a new shell :( I guess you could open up a terminal, type 'cd ', then drag the folder and hit enter, but that's a last resort...

[ Reply to This | # ]
Open terminal in a given directory
Authored by: ctierney on Oct 03, '03 02:21:29PM

Marc Liyanage has a handy toolbar script that does this:

[ Reply to This | # ]