Robert Mark Bram
Robert Mark Bram

Reputation: 9683

open HTML file using cygstart and a file url

I am trying to use cygstart to open a local HTML file in chrome. I know I can use cygstart with a URL, but the file name and file URL doesn't seem to work:

cygstart index.html
cygstart file://index.html

Upvotes: 0

Views: 569

Answers (1)

Zombo
Zombo

Reputation: 1

cygstart simply cannot do this. Similar to how cURL supports the file protocol, but wget does not:

Why does curl allow use of the file URL scheme, but not wget

As a workaround, you can put this in ~/.profile or similar:

export BROWSER=firefox

then you can use it like this:

"$BROWSER" file:index.html

Example

Upvotes: 1

Related Questions