public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Dima Pasechnik <dimpase@gmail.com>
To: cygwin@cygwin.com, Alexander Konovalov <alexk@mcs.st-and.ac.uk>
Subject: Re: Open URLs with # using cygstart.exe
Date: Sat, 14 Jul 2012 07:25:00 -0000	[thread overview]
Message-ID: <CAAWYfq0Ri4=8cUXtdkv8XJTzr1ajqOrZg6wmKohpd4GUONQvJw@mail.gmail.com> (raw)
In-Reply-To: <500020DA.5040008@cs.utoronto.ca>

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

  reply	other threads:[~2012-07-14  7:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13 12:06 Alexander Konovalov
2012-07-13 12:27 ` Csaba Raduly
2012-07-13 12:38   ` Dima Pasechnik
2012-07-13 13:03     ` Alexander Konovalov
2012-07-13 13:19       ` Ryan Johnson
2012-07-13 13:21         ` Ryan Johnson
2012-07-14  7:25           ` Dima Pasechnik [this message]
2012-07-13 14:45       ` Dima Pasechnik
2012-07-14  2:05       ` Andrey Repin
2012-07-14  2:38       ` Ken Brown
2012-07-13 13:14 ` Adam Dinwoodie
2012-07-13 15:33 ` Earnie Boyd
2012-07-13 15:37   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAWYfq0Ri4=8cUXtdkv8XJTzr1ajqOrZg6wmKohpd4GUONQvJw@mail.gmail.com' \
    --to=dimpase@gmail.com \
    --cc=alexk@mcs.st-and.ac.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).