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: <5.2.0.9.2.20021204082332.026f6dd0@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com Date: Wed, 04 Dec 2002 08:35:14 -0800 To: cygwin AT cygwin DOT com From: Randall R Schulz Subject: Re: Bash puzzle: Spaces, environment variables and tab completion In-Reply-To: References: <3DEE1305 DOT 3090507 AT mscha DOT 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 > > > > > (...) > > > > > > So, I ask the list: > > > Can you define $PF so that cd $PF; > > > ls $PF/Games; and ls $PF/G 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/