Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-Id: <5.2.0.9.2.20021204082332.026f6dd0@pop3.cris.com>
X-Sender: rrschulz@pop3.cris.com
Date: Wed, 04 Dec 2002 08:35:14 -0800
To: cygwin@cygwin.com
From: Randall R Schulz <rrschulz@cris.com>
Subject: Re: Bash puzzle: Spaces, environment variables and tab
  completion
In-Reply-To: <Pine.GSO.4.44.0212041116230.29289-100000@slinky.cs.nyu.edu
 >
References: <3DEE1305.3090507@mscha.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed

Igor,

At 08:17 2002-12-04, you wrote:
>On Wed, 4 Dec 2002, Michael Schaap wrote:
>
> > On 4-12-2002 7:09, James Shaw wrote:
> > (...)
> > > 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<tab completion!>
> > >
> > (...)
> > >
> > > So, I ask the list:
> > >         Can you define $PF so that cd $PF;
> > >         ls $PF/Games; and ls $PF/G<tab> all work???
> >
> > I'd do something like:
> >
> > % ln -s '/cygdrive/c/Program Files' /programs
> > % PF=/programs
> >
> >   - Michael
>
>$ mount 'c:\Program Files' /programs

Cheater!

Following this line of thinking, you could just change the name of that 
directory, as long as you found all the registry entries that mentioned it 
and changed them too. I think maybe Norton SystemWorks can do this sort of 
thing, though you may have to do it one app at a time.

Wouldn't the symlink approach suggested by Michael Schaap be a little less 
heavy-handed? I use it for drive directory aliases (e.g. "ln -s /cygdrive/c 
/c") and it works with completion. However, if you want to list that 
directory itself, you need to give "ls" the "-L" flag, but I have a set of 
aliases (using capital letters: "alias LS='ls -L'" or "alias LL='ls -lL'") 
to hand that not-too-common case.


>     Igor


Randall Schulz
Mountain View, CA USA 


--
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/

