I did the
alias mdcd='mkdir "$1"; cd "$1";'
thing and I got the following
ernesto@antares:~$ mdcd testdir
mkdir: cannot create directory `': No such file or directory
bash: testdir: command not found
I'm sure this alternative should work someway, but maybe you missed something? Did you try this?
I created your function and it works! I prefer the "mdcd" name though.
Anyway, thanks to you both for the tips. I have my [small] problem solved now. Thanks a lot.