Copy to ./config/fish/functions/mkdd.fish
function mkdd -d "Create a directory and set CWD"
command mkdir $argv
if test $status = 0
switch $argv[(count $argv)]
case '*'
cd $argv[(count $argv)]
return
end