Is there a way to make a link clickable in the OSX Terminal?

japetheape picture japetheape · Feb 26, 2010 · Viewed 38.1k times · Source

I am planning on developing an Mxmlc to Textmate formatter, one that formats mxmlc errors as clickable links, so you can open them up quickly in Textmate as Textmate has a url scheme e.g.: txmt://open/?url=file://~/.bash_profile&line=11&column=2.

I am wondering if it is possible to display links in your OSX terminal, that are also clickable, e.g. by changing the PS1 variable or so.

ps. I don't want to use HTML that runs in the Textmate environment.

Answer

oops picture oops · Feb 26, 2010

Before OSX Lion:

cmd+shift+double-click on a URL in Terminal.app and it will open in the default program.

OSX Lion:

cmd+double-click (otherwise you will enter fullscreen mode).