zsh-users
 help / color / mirror / code / Atom feed
From: Roman Neuhauser <neuhauser@sigpipe.cz>
To: Grant Taylor <gtaylor@tnetconsulting.net>
Cc: zsh-users@zsh.org
Subject: Re: cd x x.something
Date: Wed, 27 Sep 2017 01:56:27 +0200	[thread overview]
Message-ID: <20170926235627.GA274726@isis.sigpipe.cz> (raw)
In-Reply-To: <9aca45d9-23fc-19a4-90ac-a7c618ac68d7@tnetconsulting.net>

# gtaylor@tnetconsulting.net / 2017-09-26 13:47:23 -0600:
> On 09/26/2017 12:50 PM, Roman Neuhauser wrote:
> > cd $PWD.bak
> 
> That doesn't work for me.

can you elaborate how?  it surely should:

$ mkdir omg omg.wtf
$ cd omg
$ pwd
/home/roman/omg
$ cd $PWD.wtf
$ pwd
/home/roman/omg.wtf

> -  It's also one directory, not the two that I
> think is needed to move laterally.

`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

> Did you by chance mean the following:
> 
> cd $PWD{,.bak}
> 
> Which expands to two directories, the first with no suffix and the second
> with the .bak suffix?

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.

-- 
roman


  reply	other threads:[~2017-09-26 23:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25  2:19 tuxic
2017-09-25  3:55 ` Amir Ish-Hurwitz
2017-09-25  7:25 ` Dominik Vogt
2017-09-26 18:50 ` Roman Neuhauser
2017-09-26 19:47   ` Grant Taylor
2017-09-26 23:56     ` Roman Neuhauser [this message]
2017-09-27  1:23       ` Grant Taylor
2017-09-27  3:47         ` Bart Schaefer
2017-09-27  4:05           ` Grant Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170926235627.GA274726@isis.sigpipe.cz \
    --to=neuhauser@sigpipe.cz \
    --cc=gtaylor@tnetconsulting.net \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).