www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/07/14/03:25:14

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <500020DA.5040008@cs.utoronto.ca>
References: <B55E4FF0-6EBE-496B-89F5-B42173750B25 AT mcs DOT st-andrews DOT ac DOT uk> <CAEhDDbDOGOkiR3HH=0L2Tr272TVVPpRF0yiwWZHj7RnyFJjbnQ AT mail DOT gmail DOT com> <CAAWYfq3O6dZ15u-+t19aKrjyrgrGvR=3Pcosq-MbdFBO7_L69A AT mail DOT gmail DOT com> <F28677F6-FCA9-43AD-8B95-F9B991B33B97 AT mcs DOT st-andrews DOT ac DOT uk> <50002053 DOT 4050706 AT cs DOT utoronto DOT ca> <500020DA DOT 5040008 AT cs DOT utoronto DOT ca>
Date: Sat, 14 Jul 2012 15:24:44 +0800
Message-ID: <CAAWYfq0Ri4=8cUXtdkv8XJTzr1ajqOrZg6wmKohpd4GUONQvJw@mail.gmail.com>
Subject: Re: Open URLs with # using cygstart.exe
From: Dima Pasechnik <dimpase AT gmail DOT com>
To: cygwin AT cygwin DOT com, Alexander Konovalov <alexk AT mcs DOT st-and DOT ac DOT uk>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Alex,

On 13 July 2012 21:21, Ryan Johnson <ryan DOT johnson AT cs DOT utoronto DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019