Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Many applications (Eclipse, TextMate, ...) use OS X's integrated Open File… dialog where you have to browse and select the file and then click Open. I have many directories with many files. So opening the file can take even 20 seconds.

However I have the URL from the terminal. Given this URL of the file in the buffer, how can I use it to open the file quickly in a standard way? Is that even possible? One would expect that putting the URL in the search box would work, but it does not.

share|improve this question
up vote 2 down vote accepted

You probably mean a path (/Users/danielbeck/Desktop/file.txt) and not a URL (file:///Users/danielbeck/Desktop/file.txt) if you get it from Terminal.

If so, you can press CmdShiftG in the file dialog of the program you want to open the file with, paste the path, and the file will get selected. Just confirm the selection and the file will be opened.

Alternatively, you can use the open command in Terminal to open it in the default program:

open /Users/danielbeck/Desktop/file.txt

Or in a specific program, e.g. Sublime Text 2:

open -a 'Sublime Text 2' /Users/danielbeck/Desktop/file.txt

This approach also supports file:// URLs.

(This will probably not work with Eclipse)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .