DEV Community

Discussion on: 5 Handy Bash Tricks in 2 Minutes

Collapse
 
fernandomaia profile image
Fernando Maia • Edited

Really cool! Just learned about $_.

If anyone wants, I just created a function to perform the first item on the list in a single command.

function mdcd {
    command mkdir $1 && cd $1
}

This should work with bash and zsh, and should be added to their config files(.bashrc and .zshrc, respectively).