Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows + Chrome (Default Browser) + Local file + Anchor not working #23

Open
jens-duttke opened this issue Jul 6, 2024 · 0 comments
Open

Comments

@jens-duttke
Copy link

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:
image

If I explicitly specify the browser, it works without problems:

open-cli file://D:/test.html#anchor -- "chrome"

image

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant