zsh and cd
posted by Robbie Shade on 24 Jan 2011

zsh’s cd function has the following useful feature:

$ pwd 
    $ cd long huge 

Syntax is

$ cd [old] [new]

What this does is to find the first occurrence of old in the current path and replaces it with new. For jumping between directory trees with similar structures this is of much value.