Open a file:/// url with #anchor from terminal I've been trying to open a file:/// url e.g.

open "file:///Users/me/index.html#my-anchor"


Or

open -a Safari "file:///Users/me/index.html#my-anchor"


Or

open -a Google\ Chrome "file:///Users/me/index.html#my-anchor"


However, the browser location after opening is:

file:///Users/me/index.html


The hash/anchor has been clobbered.  Is there some way to do this that I'm missing?

(Note: Obviously this isn't what happens with URL's on web servers)
Don't use the open command.

Google Chrome:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome "file:///Users/me/index.html#my-anchor"


Safari:

osascript -e 'tell application "Safari" to open location "file:///Users/me/index.html#my-anchor2"'