Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: cd x x.something
- X-seq: zsh-users 22907
- From: Grant Taylor <gtaylor@xxxxxxxxxxxxxxxxxx>
- To: Roman Neuhauser <neuhauser@xxxxxxxxxx>
- Subject: Re: cd x x.something
- Date: Tue, 26 Sep 2017 19:23:04 -0600
- Arc-authentication-results: i=1; tncsrv06.tnetconsulting.net; none
- Arc-filter: OpenARC Filter v0.1.0 unknown-host v8R1N5Hf022629
- Arc-message-signature: i=1; a=rsa-sha256; d=tnetconsulting.net; s=2015; t=1506475389; c=relaxed/simple; bh=TPfwSsrgfeIH221MZc0PZtp34hy8JN4yRBrKoCvkQ6c=; h=DKIM-Signature:Subject:To:From:Message-ID:Date:User-Agent: MIME-Version:Content-Type:Content-Language: Content-Transfer-Encoding; b=fi1ZeiboV/uz4ERDhZd34/+EiPf75fdw86WkUxDMcZaIU+PJANKMKTamZTbPmlEWQmvcg9mbI6nipKg/IA2DM4MpWtJeNiv9AcPVsH4a0YVn40jN7E7bfH8DoQhnyq3YlTLIRE8WUF8lm/QJE4mruCnF5116XvcElH6zQvKvqHg=
- Arc-seal: i=1; a=rsa-sha256; d=tnetconsulting.net; s=2015; t=1506475389; cv=none; b=w4GINGD8Cyo2PUDL8UlV40DqwdY8EzdFWPPOw0mUyAu2rzmGU0DvqganwnV1X+pOuZGz1B1abD86SkGEKS2vE6vS5LcOmrB+oJvAZOTw+ezRcNqfPwdauqAGypxXLCNawa2plzUnlIOPwBKOp7SuGwpi2UD/z+48JB57Onop5Kw=
- Authentication-results: tncsrv06.tnetconsulting.net; arc=none header.d=tnetconsulting.net
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=tnetconsulting.net; s=2015; t=1506475389; bh=TPfwSsrgfeIH221MZc0PZtp34hy8JN4yRBrKoCvkQ6c=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=0JP6ErbvVrFyIujFY/VSO7CeVTxRz3RspXW4sSTUDnYuvGkwQK0qS3qX5BWUzVcDz ep0/wupmSVjbPt3XVr3Dl5CHqo2kDXorBtMkfBRKpFXslj5EpO1vUX1lt8nY4I94Zg uPXPbhXe7PM5q2IzJhobVUdlNz9I2mtn6/ygGp7s=
- In-reply-to: <20170926235627.GA274726@isis.sigpipe.cz>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20170925021928.kmibsqzal2biy6w2@solfire> <20170926185049.GK8773@isis.sigpipe.cz> <9aca45d9-23fc-19a4-90ac-a7c618ac68d7@tnetconsulting.net> <20170926235627.GA274726@isis.sigpipe.cz>
On 09/26/2017 05:56 PM, Roman Neuhauser wrote:
can you elaborate how? it surely should:
I'll have to look at my command history at work where I tried this.
$ mkdir omg omg.wtf
$ cd omg
$ pwd
/home/roman/omg
$ cd $PWD.wtf
$ pwd
/home/roman/omg.wtf
That works for me at home.
I'm guessing that I used "omg.wtf" instead of "$PWD.wtf". Which leads
me to think that this is something special that acts on the PWD
environment variable.
Or there's some sort of environment variable permutation that I'm not
aware of. Which is completely possible.
`cd foo bar` does not "move laterally", it's like `cd ${PWD:s#foo#bar}`,
except `foo` is not treated as a glob. this doesn't look lateral to me:
$ mkdir x
$ cd x
$ pwd
/home/roman/x
$ mkdir -p .$PWD
$ cd / ./
$ pwd
/home/roman/x/home/roman/x
Okay, I see what you're saying.
% cd /dev/shm
% mkdir omg omg.wtf
% cd omg
% pwd
/dev/shm/omg
% cd omg omg.wtf
% pwd
/dev/shm/omg.wtf
That's why I was saying laterally.
no, i meant what i wrote: since the second directory differs from $PWD
only in the ".bak" suffix, `cd $PWD.bak` will have the desired effect.
Fair.
Thank you for the explanation Roman.
--
Grant. . . .
unix || die
Messages sorted by:
Reverse Date,
Date,
Thread,
Author