X-Spam-Check-By: sourceware.org Message-ID: <20060105225825.39736.qmail@web53412.mail.yahoo.com> Date: Thu, 5 Jan 2006 14:58:25 -0800 (PST) From: Dave Subject: Re: chere problem with directories with single quote marks To: cygwin AT cygwin DOT com Cc: Eric Blake In-Reply-To: <43BBD542.90604@byu.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --- Eric Blake wrote: > According to Dave on 1/3/2006 2:03 PM: > >> > >>the here-doc correctly preserved the input string. So applying that to > >>the above problem, the registry entry MIGHT work (untested by me) if it is > >>written as: > >> > >>SHELL_CMD="-l -c \\\"xargs -0 cd << 'EOF'\n%L\nEOF\nexec $SHELL_EXE\\\"" > > > > > > Hmmm. It appears that I haven't handled this case consistently. I'll have a > look > > at getting both ' and $ to work properly. > > Scratch my above example; cd is a shell builtin, so it won't work from Thanks for trying things, but... The original poster is using the -1 option which attempts to get to the appropriate directory without executing the intermediate script (xhere). As you've seen this has problems with quoting which are unique to each of the shells, since it is the shell that is evaluating the argument. This method also has problems accessing network paths and starting ash and tcsh as noted on the man page. I've tested the other start option (-2), and that correctly goes to the path "\\Minime\$@dave's `stuff". That contains an apostrophe, a backtick and what could be interpreted as a shell parameter, all on a network path. I'm not entirely sure why this works, but I suspect it has to do with the lack of recursive parameter expansion. But don't quote me on that :) Since the single quotes prevent shell expansion and things, I think that they are most appropriate for the -1 option. I will note the limitation on entering directories containing apostrophes in the man page. The -2 option is the default, so I don't see this being a major issue. Regards, Dave. __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com -- 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/