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: <20021206065752.27690.qmail@web13606.mail.yahoo.com> Date: Thu, 5 Dec 2002 22:57:52 -0800 (PST) From: James Shaw Subject: Re: 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, > PF=$(cygpath -u $(cygpath -d '/cygdrive/c/Program Files')) And we have a winner! Gary wins the December Bash Hacking award. (Well, IMHO) Clunky, yes with the DOS 8.3 names, but it is the closest to solving the puzzle (without cheating). > Learn about "cygstart" and you won't have to > script these things yourself. Thanks, Randall. I learned about cygpath and got so excited that I never bothered reading the rest of the cyg* functions. It was good Perl experience, but I basically rewrote a small bit of cygstart. Learning about cygstart is like getting to open a Christmas present early! Time to go through and mothball some scripts and update my aliases! And, thanks to Lassi and Ehud for their followups. Lassi suggested zsh, but I'm currently mostly happy with bash and switching to zsh might help tab completion but lose something else (vi editing and history search?) Ehud suggested: cd () { builtin cd "$1" builtin cd `pwd -P` } to overcome the fact that I'm now in ~/pf or whatever symlink. Unfortunately, this didn't work since `pwd -P` returns a path with spaces, and we're back to square one. (And as a minor nitpick, it would mess up the use of "cd -" which I find handy.) In general though, defining function wrappers rather than aliases is a good idea. I still don't think of doing this, so I appreciate the reminder. I still don't have a "perfect" solution, but I've now got a lot of tools to play with and many good-enough solutions to choose from. Again, many thanks for everyone's help. Best, 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/