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

Re: cd x x.something



>
> /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