delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/08/04/02:43:17

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=lXA9PcZ
WGagWVZGQlCPtsSR7iUIp4D8EWzS9ZOSF9as4RDIHbnOWw3ikwczhv2zrc2NhGuk
XESV+zdDnAKsvJ9aK4I1aIAOnVqfUomzsMgpL+1r8B9OUpDOeen0SNuuTGRqiZ1n
KUeQrQ1D902Nz0i1qvjxvCk6ycbC8lNCOetc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=qtF9wZ4Yf9hrr
wJdBnS95MVqELM=; b=ifB2Y8CheW7rj3KpIf+pU0nmvG9D4A0rDyxc/BPRW5Pas
KRMHb0WcUj42fjDjPP6YOcevDBhifsnQSQetBWEjDjFedQySvhtEq7qBAsR3Og3T
HBYmN5W35vW1rlPrRaPCwFJ7dZ6I12RRDeCfBIIxRnFlB3MCqXZig1ZXUkn6QU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=Canada, doug, registry, Doug
X-HELO: mail-qk0-f176.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=XKCOSdckb4F2d8QISGcO0S+Ra5RAWoGNiQig/4PB/HI=; b=MluaLpmt7Odw492xheI6ck74q7zXGGv/RX0NJOj2H893wuyFXNjagfIyWYa6P0nh5J Z3D3k0K+le9NHLg3krKkk+mkQSHT97lKEi7Vysp2vfwpKY7ym3fY/3kbyn43YbzkGRI1 HqPRjHcPcii5gGgrxE0ukYveHu0zTgBD6TduboOBS2oJnUV+nOI1+iOEQbI8ymeUbGOQ AeSBi6+YXIqr8l3ar+krJecLlKrPCZo2gjKTbIfLAPYIa+g5rZli6uHUerROAUtqN3lm NOpoEYE7K8cLmflbRR9XKGx89Jfpn97CIFFwqTjRRg3d/OlshIL7JL4rg9yw8M2BS9U6 4wrw==
X-Gm-Message-State: AEkoousNayuux2w0M3H3cjgOE27/JHBeMkIbyFDwOgwlOqC9m4MHE88Qk2A1wB9XzY+buZ404tvmWN70pMB+Hg==
X-Received: by 10.55.31.198 with SMTP id n67mr4590736qkh.238.1470292976826; Wed, 03 Aug 2016 23:42:56 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <000001d1ee08$f92bee90$eb83cbb0$@rogers.com>
References: <001001d1edf1$a4e1ae90$eea50bb0$@rogers.com> <b572984759892a20202a879d54e1213a AT mail DOT kylheku DOT com> <000001d1ee08$f92bee90$eb83cbb0$@rogers.com>
From: Doug Henderson <djndnbvg AT gmail DOT com>
Date: Thu, 4 Aug 2016 00:42:36 -0600
Message-ID: <CAJ1FpuPniUtuDwt73pF5NahGg+1GKXsGwAN_Yy-v6bCxMZshCw@mail.gmail.com>
Subject: Re: PATHEXT is fundamental to Windows and Should be recognised by CYGWIN
To: cygwin <cygwin AT cygwin DOT com>
X-IsSubscribed: yes

On 3 August 2016 at 22:30, Michel LaBarre  wrote:

> ...
>
> PATHEXT has been part of Windows for as long as I can remember - back to
> the mid-80's - used by shells that run under windows
>


First, this discussion is more appropriate for cygwin-talk than this list.

Second, PATHEXT is an attempt to carry the concept of default behavior
(based on its extension) for a file in the graphics window world, into the
command line world. That default behavior is hidden away in the registry
where normal users fear to tread and experts tread with care. That default
behavior is subject to the whims of the most recently installed program
than thinks it knows what the user wants to do with a file with a
particular extension.

The default behavior of a newly installed version of windows is to hide the
extension, and only show an icon in the explorer, where (again) the icon
depends on the most recently installed program than thought it knew what
icon should go with that file extension. And that icon to extension mapping
does not guarantee or require a unique icon for each extension, so, unless
you dig through the registry you have no way of knowing, in advance, what
will happen when you double click that file. And any knowledge you gained
from experience may get changed by the next program you install, without
your knowledge or permission.

A couple of examples: I work with Oracle databases, so 90% of my .sql files
are Oracle scripts and PL/SQL. I had to install MSSQL for some reason, and
suddenly an accidental double click on an .sql file was opening some huge
slow Microsoft tool instead of SQL Developer. It was an annoying fiddle to
restore useful behavior.

I use Python a lot. I have 7 versions (of Python, 5 for Win, 2 for cygwin,
plus Jython and IronPython) installed right now, so I need to pick my
environment for each .py file, or for my current project. I had to install
Visual Studio and a Python plugin for it. VS hijacked my .py files, ignores
#! lines, and takes forever to load and open an editor window. Now though,
double clicked a .py file or entering its name (with or without the
extension) at the command prompt opens it in a fast and useful text editor.

To summarize, I don't think PATHEXT is such a great feature of the command
prompt that it needs to be emulated in cygwin.

If I have gone to the trouble of typing "./name_of_file", (you don't have
"." in your PATH do you?) it's no big effort to hit TAB (for command
completion) and fill in the explicit extension. And if I'm writing a
script, I'm a fool if I don't include the extension.

And BTW, I set CYGWIN_NOWINPATH=1 from the control panel so I can't
accidentally run a windows program when I meant to run a cygwin one.


Doug

--
Doug Henderson, Calgary, Alberta, Canada

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