Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: cd x x.something
- X-seq: zsh-users 22902
- From: Amir Ish-Hurwitz <amirih@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: cd x x.something
- Date: Mon, 25 Sep 2017 05:55:37 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=l64cOsIltfcduonktEJwl30ArT3NICHRAHd8oVOzvf8=; b=UsbIYCkg+czudvqJEYLM0SrrRY11XS6qEIkn5rY7MB+Psv2EpfSOVpq2cwO3tlAAB5 7dvQCFPjRqTIVg+4ddod0NCwpq8vCHBYXogX+94YiWjNdzcJypRGQ0rT74n8wW3ncJ3B QeW92obxbNc9Sz8cSSlKRSONEA2039flnrB38zNjyg+OEH+MWZTEMh36FmZkIGThd6kp jzJeVTBipAI8scV4X1h9vAbwu+hBIFW/YqhkZmJSscmqev2lY/DA+ko7Uvt3aXB9X0CI TNr2Bd4Q4ItVIhj34R1Y6BWqNdsje+UVGoqh/WjxS1I0ii2i/2sL9jXwlhFYIHWBWY9j ZDtw==
- In-reply-to: <20170925021928.kmibsqzal2biy6w2@solfire>
- 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>
>
> /abcd/efgh/ijk
>
> /abcdefgh/lmn
>
> cd ijk lmn
>
I suppose you meant /abcd*/*efgh/lmn 😏
What cd A B really does is simply replace the first occurance of string A
in $PWD with string B and cd to the result.
/a/b/ThisIsARedicoluousLongDirectoryNameWhichNoPersonWillReallyTypeInTwice
/a/b/ThisIsARedicoluousLongDirectoryNameWhichNoPersonWillReallyTy
> peInTwice.bak
>
I'd simply type *cd $PWD $PWD.bak* in this particular case as that's the
shortest option I can think of.
Regards,
Amir
Messages sorted by:
Reverse Date,
Date,
Thread,
Author