Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <20021204060952.8081.qmail@web13602.mail.yahoo.com> Date: Tue, 3 Dec 2002 22:09:52 -0800 (PST) From: James Shaw Subject: Bash puzzle: Spaces, environment variables and tab completion To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi everyone, I have been using cygwin for several months, and there is something that I haven't been able to figure out how to do: effectively use spaces in bash environment varibles. I realize this is basically a bash question and isn't cygwin specific, but I'm sure more cygwin users have to deal with spaces in bash than the typical bash user. What I want to do is define an environment variable so I can easily cd or ls. E.g. % PF="/cygdrive/c/Program Files" % cd $PF % ls $PF/Games % ls $PF/G The above is close, I can % cd "$PF"; ls "$PF"/Games; and even ls "$PF"/G however, the quotes are clunky. My kludge to avoid the quotes is: % PF2="/cygdrive/c/Program?Files" which allows cd $PF; ls $PF/Games, but stops bash in its tracks on tab completion. Since I would find this very handy, I've spent some time on trying to make this work. I've tried various quoting schemes, but with no luck. So, I ask the list: Can you define $PF so that cd $PF; ls $PF/Games; and ls $PF/G all work??? I usually like to puzzle these out for myself, but in this case, I'm stumped. Thanks for your help, James __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- 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/