This is the mail archive of the
mailing list for the Cygwin project.
Re: Bash puzzle: Spaces, environment variables and tab completion
- From: Randall R Schulz <rrschulz at cris dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 04 Dec 2002 08:35:14 -0800
- Subject: Re: Bash puzzle: Spaces, environment variables and tab completion
- References: <3DEE1305.email@example.com>
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
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.
Mountain View, CA USA
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html