Open a Browser from the Command Line (Mac OS X)
In Mac OS X, to open Safari on a file (e.g., README.html) from the command line, use the "open" command with the "-a" switch:
open -a /Applications/Safari.app README.htmlReplace Safari with Firefox to use Mozilla Firefox. Why do this at all? I'm working on the command line and it's a pain to "open ." to get a Finder window, and then drag-&-drop the file in question onto the appropriate dock icon. Lastly, add aliases to ~/.bashrc to cut down on the typing even further:
0 Comments:
Post a Comment
<< Home