问题
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.
回答1:
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).
回答2:
You can right click on a URL in Terminal and the first option in the context-sensitive menu is "Open URL". Not perfect, but maybe good enough ?
回答3:
Pipe your output to lynx
:
your_command | lynx -use_mouse -stdin
来源:https://stackoverflow.com/questions/2338765/is-there-a-way-to-make-a-link-clickable-in-the-osx-terminal