This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Open URLs with # using cygstart.exe


Alex,

On 13 July 2012 21:21, Ryan Johnson <ryan.johnson@cs.utoronto.ca> wrote:
> On 13/07/2012 9:19 AM, Ryan Johnson wrote:
>>
>> Cygstart does not actually parse general URIs. For a long time it had a
>> special case that tested explicitly for `http:', and recently added
>> `mailto:' after a similar issue arose [1]. Ironically, most URIs seem to
>> work precisely because cygstart *doesn't* know what to do with them and
>> passes them along as-is, giving Windows a chance to do the right thing.
>
> Actually, you can probably ignore this and go with what Adam posted...
At least you can use cygwin do find out the default browser to launch

$ cat /proc/registry/HKEY_CURRENT_USER/Software/Classes/http/shell/open/command/@
"C:\Program Files\Mozilla Firefox\firefox.exe" -requestPending -osint -url "%1"
$

You can use this info to create a script that would launch the browser
with the argument
file:///C:/somepath/doc/ref/chap31.htm#X84F59A2687C62763

(note that you might need to rename the files from .html to .htm)

It should be doable, as at Windows command prompt the following works:

C:\>"C:\Program Files\Mozilla Firefox\firefox.exe"
file://C:/tmp/chap39.htm#X79C44528864044C5

HTH,
Dima

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]