delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/06/23/13:05:43

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: Yes, hits=6.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,FSL_RU_URL,KAM_THEBAT,TW_YG
X-Spam-Check-By: sourceware.org
Date: Thu, 23 Jun 2011 20:57:26 +0400
From: Andrey Repin <anrdaemon AT freemail DOT ru>
Reply-To: Andrey Repin <cygwin AT cygwin DOT com>
Message-ID: <242741011.20110623205726@mtu-net.ru>
To: Corinna Vinschen <cygwin AT cygwin DOT com>
Subject: Re: Strange cygpath behavior.
In-Reply-To: <20110623141253.GA20806@calimero.vinschen.de>
References: <73619422 DOT 20110621092310 AT mtu-net DOT ru> <20110623141253 DOT GA20806 AT calimero DOT vinschen DOT de>
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, Corinna Vinschen!

> There's something weird in your bash settings.

My apology. I forgot to mention, it wasn't executed from bash. I've tried it
from 4NT command prompt and from native Windows CMD prompt.
Under both, cygpath exhibited the same behavior, as well as other programs
(diff, readlink (inside shell script, launched through env.exe from windows
association** - as shown in mid:1144668147 DOT 20110623190534 AT mtu-net DOT ru ) and so on).

> Usually bash will fold the backslashes before using the string as argument
> to the child process.

That's true for when you launch scripts from bash'ed console. But when you
just launch script/program from an unknown environment, that's not always work
straight.
As I said earlier, diff works as long as both file arguments are local
(X:\path\file), but break apart on network names, be it Windows (\\...)or Unix
(//...) style. Only way I've found so far is to attempt a nontrivial and very
leveled fool-checking, but that way I'm shooting myself into the leg, as such
a proof-reading reduce my ability to supply additional arguments to, i.e., diff.

> I don't know what the difference in your settings is, though.  Something
> with readline, maybe.

Seeing as even cygpath exhibiting such strange behavior, I suspect something
in the base path translation logic. 

P.S.
I drastically reduced the quote, as it seems that my reply isn't directly
related to it's text, and leaving it in place would've highly reduced the
message readability, but I still feeling sorry for such a truncation. So,
there's my apology again.

P.P.S.
**That association.
$ assoc .sh
.sh=unixshell.script

$ ftype unixshell.script
unixshell.script="C:/Programs/Cygwin/bin/env.exe" "%1" %*


--
WBR,
 Andrey Repin (anrdaemon AT freemail DOT ru) 23.06.2011, <19:54>

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