Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: making `cd` work unquoted



On 2009-08-05 at 12:47 -0700, spiralofhope wrote:
> On Wed, 5 Aug 2009 17:14:03 +0200
> Sebastian Stark <seb-zsh@xxxxxxxxxxx> wrote:
> 
> > You would also have to deal with the special case cd with two
> > arguments:
> > 
> > Consider you are in /home/userA/tmp
> > 
> >    cd userA userB
> > 
> > would lead you to /home/userB/tmp
> 
> I tried this out, and it's interesting.  I didn't realise this was
> possible.  I can't imagine why I'd want to do this though.

I have multiple perforce clients, under a common area, sometimes with
common directories from the depot mapped.  It's *very* convenient, when
five levels deep inside the client, to be able to switch to the
corresponding directory in another client.  Often, it's as simple as:

% cd 1 2

Imagine paths like:
  /home/me/p4/client1/hierarchy/java/com/example/project/sub-system/component/
to get the full impact.

Regards,
-Phil



Messages sorted by: Reverse Date, Date, Thread, Author