delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/12/24/01:48:33

X-Spam-Check-By: sourceware.org
Date: Fri, 23 Dec 2005 22:48:14 -0800
From: Tom Plunket <tomas AT fancy DOT org>
Message-ID: <193897177.20051223224814@fancy.org>
To: cygwin AT cygwin DOT com
Subject: chere problem with directories with single quote marks
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Hey gang,

So I started having this little issue with chere, where every once in
a while the startup fails.  I go to the parent folder, and it works
just dandy.

I actually bothered to think about the problem today, and it has to do
with the way the folder name is quoted.  I use bash, and here's the
string in the chere script:

       SHELL_CMD="-l -c \\\"cd '%L'; exec $SHELL_EXE\\\""

As you can see, this is clearly "wrong" for folders with a
single-quote mark in them.

My local fix was just to edit the registry and change '%L' to "%L".
Obviously this affects the handling of this feature with folders that
have a double-quote mark in them, but as I only use single quotes
(e.g. "Debbie's Truck" or "Craig's List"), it Works For Me.  ;)

Maybe there's a way to get quoted strings out of Windows?  I really
don't know too much about the way this stuff works in Windows, so
couldn't give you a Real Answer, but wanted to flag this issue as I
didn't see this specific behavior discussed in the archives.

btw, thanks for doing this.  I always had some hack or another to get
this functionality but it was never truly what I wanted it to be.
Maybe this has been there forever, but I never knew about it 'til this
past fall (and I've been using Cygwin here and there since B19).

-tom!


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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