Bash Command "mkcd"
Oliver Rath
rath at mglug.de
Wed Feb 23 17:49:14 UTC 2022
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 *m*a*k*e & *c*hange *d*irectory 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20220223/d32cb166/attachment.html>
More information about the ubuntu-devel
mailing list