Wednesday, 23 February 2022

Re: Bash Command "mkcd"

Hi Pixi,

Am 23.02.22 um 15:39 schrieb Pixelbog Pixi:
Dear Ubuntu-Team,

I have a question:
Is it possible to add the command mkcd?
It stands for make & change directory and I think it will be super usefull.

It happened already way too often that I typed "mk foo && cd foo" and
with mkcd it will save 8 keystrokes for the example "foo".

The most easy way for you is function in you .bashrc (in the homedir)

Just include

mkcd() {
    #do things with parameters like $1 such as
    make $1          
    cd $1        
}

Then you can use this command.

Hth!

Oliver