Re: cd as much as possible
On Thu, 10 Mar 2016, kamaraju kusumanchi wrote:
The find command probably can handle this maybe in a shorter form. I
don't know as much syntax of that command as I'd like otherwise this could
probably written in a single line of code.
Date: Thu, 10 Mar 2016 22:45:09
From: kamaraju kusumanchi <email@example.com>
To: "firstname.lastname@example.org" <email@example.com>,
Subject: Re: cd as much as possible
Resent-Date: Fri, 11 Mar 2016 03:45:45 +0000 (UTC)
On Thu, Mar 10, 2016 at 2:11 AM, Teemu Likonen <firstname.lastname@example.org> wrote:
I don't know about zsh but here's a sh/bash function:
while ! cd -- "$dir"; do
dir=$(dirname -- "$dir")
This is exactly what I wanted. Thanks. It works in zsh too.