Added mkcd to make a dir and quickly enter it

This commit is contained in:
David Thurstenson 2021-03-14 15:56:53 -05:00
parent 2788e0770e
commit d10cdf555a
1 changed files with 10 additions and 0 deletions

10
.bashrc.d/mkcd.bash Normal file
View File

@ -0,0 +1,10 @@
mkcd() {
if [[ -v 2 ]]; then
echo "E: mkcd accepts only one argument"
exit 1
fi
# shellcheck disable=SC2164
mkdir -pv "$1" && cd "$1"
echo "cd: $(pwd)"
}