On Thu, Mar 10, 2016 at 2:11 AM, Teemu Likonen <tliko...@iki.fi> wrote: > > I don't know about zsh but here's a sh/bash function: > > mycd() { > local dir=$1 > while ! cd -- "$dir"; do > dir=$(dirname -- "$dir") > done > } >
This is exactly what I wanted. Thanks. It works in zsh too. raju -- Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog