[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkdir new parameter
From: |
Pádraig Brady |
Subject: |
Re: mkdir new parameter |
Date: |
Fri, 29 Jul 2011 12:28:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 |
On 07/29/2011 01:52 AM, Willian Sodré da Paixão wrote:
> Almost every time I make a directory, I get into it.
> So, I thought: would be nice if a parameter -something create and enter the
> new directory.
>
> I can do it, but you will apply the patch? This idea is realy good for you?
That's not possible as the command can't change the $CWD of the shell.
I use this shell function all the time (it's in my .bashrc):
# make and change to a directory
md () { mkdir -p "$1" && cd "$1"; }
cheers,
Pádraig.