<div>Hello all,</div><div> </div><div><div>maybe can defining by a simple bash function and things get easier.</div><div> </div><div>add .bashrc</div><div> </div><div><div>function mkcd () {<!-- --></div><div>     mkdir "$1" && cd "$1"</div><div> }</div><div> </div><div>$ source /home/user/.bashrc</div><div>$ mkcd test</div><div>$ pwd</div><div>/home/user/test</div><div> </div><div>and please read:</div><div><div><a href="https://onethingwell.org/post/586977440/mkcd-improved" rel="noopener noreferrer" target="_blank">https://onethingwell.org/post/586977440/mkcd-improved</a></div><div> </div></div><div>Happy Hacking!</div><div> </div><div>Ozgur</div><div> </div></div></div><div>24.02.2022, 18:32, "Oliver Rath" <rath@mglug.de>:</div><blockquote><p>Hi Pixi,</p><div>Am 23.02.22 um 15:39 schrieb Pixelbog Pixi:</div><blockquote><div>Dear Ubuntu-Team,</div><div> </div><div>I have a question:</div><div>Is it possible to add the command ​<strong>mkcd​</strong>?</div><div>It stands for <strong>m</strong>a<strong>k</strong>e & <strong>c</strong>hange <strong>d</strong>irectory and I think it will be super usefull.</div><div> </div><div>It happened already way too often that I typed "<strong>mk foo && cd foo</strong>" and</div><div>with <strong>mkcd</strong> it will save 8 keystrokes for the example "foo".</div></blockquote><p>The most easy way for you is function in you .bashrc (in the homedir)</p><p>Just include</p>mkcd() {<!-- --><br />    #do things with parameters like $1 such as<br />    make $1          <br />    cd $1        <br />}<br /> <p>Then you can use this command.</p><p>Hth!</p><p>Oliver</p><p> </p> ,--<br />ubuntu-devel mailing list<br /><a href="mailto:ubuntu-devel@lists.ubuntu.com" rel="noopener noreferrer">ubuntu-devel@lists.ubuntu.com</a><br />Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel" rel="noopener noreferrer">https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel</a></blockquote>