delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/04/02:05:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
From: "Gary R. Van Sickle" <g DOT r DOT vansickle AT worldnet DOT att DOT net>
To: <cygwin AT cygwin DOT com>
Subject: RE: Bash puzzle: Spaces, environment variables and tab completion
Date: Wed, 4 Dec 2002 01:05:25 -0600
Message-ID: <NCBBIHCHBLCMLBLOBONKIEAODJAA.g.r.vansickle@worldnet.att.net>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
In-Reply-To: <20021204060952.8081.qmail@web13602.mail.yahoo.com>
Importance: Normal

[snip $PF is a path with spaces]

> So, I ask the list:
>         Can you define $PF so that cd $PF;
>         ls $PF/Games; and ls $PF/G<tab> all work???

Yep: use single-quotes ('), not double (").  And ask not why; there are none
alive who understand the seemingly random shell quoting rules.

Note also that this doesn't do what one needs it to in all circumstances (FOR
NAME in $LIST_OF_PATHS_WITH_SPACES... comes to mind); in such cases you must
resort to the very useful "cygpath" utility (q.v.).

--
Gary R. Van Sickle
Brewer.  Patriot.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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