I'm using urlview in CLI tools like tmux to easily extract links without having to use the mouse and copy/paste under OS X. To make use of urlviews capability to automatically open these URLs ins your browser, one has to specify the browser in the configuration file. As for some reason or other calling firefox when it's already open won't work under OS X, though it should (see for instance this entry on superuser).
The suggested solution is to use open instead, which also works fine as long as the URL starts with protocol scheme (e.g. http://, ftp://, ... ). Often I get links where the scheme is omitted and where the scheme-specific part starts with www.
Those won't work, as open assumes that this is the name of a file in the current directory. Since now I've manually edited the link in the urlview selection window, but that's somewhat cumbersome.
Is there a way to overcome this problem? Maybe teach open to treat files starting with www. as URLs? Or to somehow make urlview add the missing http:// before handing it over to the defined programm? Or has anyone found a solution to the firefox-Problem under OS X with a running instance?
I've already tried using open with application specified, to pass additional switches but, calling e.g. will make
open -a 'Firefox -url www.google.de'
won't work either (and if I reduce the quotes to Firefox -url it will again assume www.google.de to be a file)
Thanks in advance for your help!