[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cd as much as possible

On Thu, Mar 10, 2016 at 1:48 AM, Jens Bauer <jens-lists@gpio.dk> wrote:
> Hi Kamaraju.
> Yes, it's possible. You could for instance write a bash function, which would do it.
> But why would you want to do that ?

I have the following directory structure


where the issue numbers are not contiguous. If I am working on an
issue, say issue-37, I would like to do
cd tmp/issue-37

If issue-37 is a new issue, I would like to be inside tmp so I can
mkdir issue-37 if necessary.
If it is an existing issue, I would like to be inside issue-37 automatically.

> If you need to create all the directories, then you can just supply -p to mkdir.

I am aware of mkdir -p option. But that is not what I want here.

Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

Reply to: