I'm using Windows 10, and my default browser is Google Chrome.
I want to open a local HTML file in the user's default browser and directly jump to an anchor within this file.
However, if I use:
open-cli file://D:/test.html#anchor
it just opens file://D:/test.html
in Google Chrome:
If I explicitly specify the browser, it works without problems:
open-cli file://D:/test.html#anchor -- "chrome"
Side note: 'google chrome'
, as described in the readme, doesn't work for me. It has to be just 'chrome'
.
I thought it might be related to the --
after the URL, so I tried this as a workaround:
open-cli file://D:/test.html#anchor -- ""
This opens the default browser, but it also removes the anchor.
The same behaviour if I wrap the URL in quotes:
open-cli "file://D:/test.html#anchor"
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too