delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/10/06:15:32

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=2.9 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT
X-Spam-Check-By: sourceware.org
Date: Thu, 10 Jun 2010 14:10:34 +0400
From: Andrey Repin <anrdaemon AT freemail DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <795864420.20100610141034@mtu-net.ru>
To: Julio Costa <costaju AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: 'cp' utility bug when <dest-name>.exe file exist.
In-Reply-To: <AANLkTikJ9U3U49HlT9Ldm6aueX3z22gN_6L95P-E2Pwz@mail.gmail.com>
References: <OFF145E76E DOT EB43EC60-ON8525773C DOT 005639A6-8525773C DOT 005650D6 AT lnotes-gw DOT ent DOT nwie DOT net> <AANLkTil0pNuO4a9n2Ln5H3Q0cJRdQER7NlgSTg2a9EN2 AT mail DOT gmail DOT com> <OFCB72527D DOT F8E42EE2-ON8525773C DOT 0058E3E2-8525773C DOT 0059F451 AT lnotes-gw DOT ent DOT nwie DOT net> <1276042636 DOT 1651 DOT 9 DOT camel AT erebor> <AANLkTil6fa2-stL9f3hd-Dg-X6FjzVKLeG56lPoI7OYp AT mail DOT gmail DOT com> <20100609044034 DOT GB9305 AT ednor DOT casa DOT cgf DOT cx> <AANLkTikJ9U3U49HlT9Ldm6aueX3z22gN_6L95P-E2Pwz AT mail DOT gmail DOT com>
MIME-Version: 1.0
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

Greetings, Julio Costa!

>>>And this is where my head got reeeally spinning... can anyone, please,
>>>explain the reason to why this .exe magic exists, anyway?
>>
>> It's already been explained in this very thread.
>>

> I'm must be getting pretty dense.
> The only explanation I already had seen was from Eric Blake:
> "(...) but Windows insists on having the .exe suffix for cmd to be
> able to run an executable (...)"

> That was already been explained, in other occasions, and also in the
> thread indicated by myself.
> The point is, that *is not* a reason, because it is easily fixed by
> "set PATHEXE=%PATHEXE%:.".

> Demo:
> = - = - = - = - = - = -

That's nice one, as has been pointed, but let's make a step back to the
definitions and see what we have on hand, before advancing in this way?
"Extension is a part of the file name, after last period".
Two conclusions we can make from it:
1. Extension itself can't contain a period.
2. The file can't have an extension only and only if it has no periods in the
name.

Doing this kind of magic, you only ease the burden of file handling for cygwin
in windows, but by a little margin, IMO.
File name could have more dots than what you can imagine...

Also, this same trick could be applied to the Explorer as well.

REGEDIT4

[HKEY_CLASSES_ROOT\.\shell\Open\command]
@="\"%1\" %*"




--
WBR,
 Andrey Repin (anrdaemon AT freemail DOT ru) 10.06.2010, <13:57>

Sorry for my terrible english...


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